Overview
| Comment: | Updated configure system to latest version of macros |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
a72b70810b5c23771b324ebb5ce82f18 |
| User & Date: | rkeene on 2016-12-09 04:36:35.800 |
| Other Links: | manifest | tags |
Context
|
2016-12-09
| ||
| 05:22 | Updated with a better check for -Wno-unused-result for TCC check-in: 7cda94da9b user: rkeene tags: trunk | |
| 04:36 | Updated configure system to latest version of macros check-in: a72b70810b user: rkeene tags: trunk | |
|
2016-03-30
| ||
| 03:20 | Better sanitization of "AR" and "CC" when trying to figure out the cross-prefix check-in: 5dde744f4b user: rkeene tags: trunk | |
Changes
Modified aclocal/shobj.m4
from [9a0374cc5c]
to [1858889d4f].
| ︙ | ︙ | |||
77 78 79 80 81 82 83 |
SHLIBOBJS=""
for obj in $LIB@&t@OBJS; do
SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`"
done
])
AC_DEFUN([DC_SYNC_RPATH], [
| > > > > > > > > > > > > > > > > > > > | > > | | | | | | | > | > | | | | | | | | | | | | > | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
SHLIBOBJS=""
for obj in $LIB@&t@OBJS; do
SHLIBOBJS="$SHLIBOBJS `echo $obj | sed 's/\.o$/_shr.o/g'`"
done
])
AC_DEFUN([DC_SYNC_RPATH], [
AC_ARG_ENABLE([rpath], AS_HELP_STRING([--disable-rpath], [disable setting of rpath]), [
if test "$enableval" = 'no'; then
set_rpath='no'
else
set_rpath='yes'
fi
], [
if test "$cross_compiling" = 'yes'; then
set_rpath='no'
else
ifelse($1, [], [
set_rpath='yes'
], [
set_rpath='$1'
])
fi
])
if test "$set_rpath" = 'yes'; then
OLD_LDFLAGS="$LDFLAGS"
AC_CACHE_CHECK([how to set rpath], [rsk_cv_link_set_rpath], [
AC_LANG_PUSH(C)
for tryrpath in "-Wl,-rpath" "-Wl,--rpath" "-Wl,-R"; do
LDFLAGS="$OLD_LDFLAGS $tryrpath -Wl,/tmp"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ return(0); ])], [
rsk_cv_link_set_rpath="$tryrpath"
break
])
done
AC_LANG_POP(C)
unset tryrpath
])
LDFLAGS="$OLD_LDFLAGS"
unset OLD_LDFLAGS
ADDLDFLAGS=""
for opt in $LDFLAGS $LIBS; do
if echo "$opt" | grep '^-L' >/dev/null; then
rpathdir="`echo "$opt" | sed 's@^-L *@@'`"
ADDLDFLAGS="$ADDLDFLAGS $rsk_cv_link_set_rpath -Wl,$rpathdir"
fi
done
unset opt
LDFLAGS="$LDFLAGS $ADDLDFLAGS"
unset ADDLDFLAGS
fi
])
AC_DEFUN([DC_CHK_OS_INFO], [
AC_CANONICAL_HOST
AC_SUBST(SHOBJEXT)
AC_SUBST(SHOBJFLAGS)
AC_SUBST(SHOBJCPPFLAGS)
|
| ︙ | ︙ | |||
138 139 140 141 142 143 144 | SHOBJEXT="so" ;; *) SHOBJEXT="sl" ;; esac ;; | < < < > > | | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | SHOBJEXT="so" ;; *) SHOBJEXT="sl" ;; esac ;; mingw32|mingw32msvc*) SHOBJEXT="dll" AREXT='lib' CFLAGS="$CFLAGS -mms-bitfields" CPPFLAGS="$CPPFLAGS -mms-bitfields" SHOBJCPPFLAGS="-DPIC" SHOBJLDFLAGS='-shared -Wl,--dll -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a' ;; msvc) SHOBJEXT="dll" AREXT='lib' CFLAGS="$CFLAGS -nologo" SHOBJCPPFLAGS='-DPIC' SHOBJLDFLAGS='/LD /LINK /NODEFAULTLIB:MSVCRT' ;; cygwin*) SHOBJEXT="dll" SHOBJFLAGS="-fPIC" SHOBJCPPFLAGS="-DPIC" CFLAGS="$CFLAGS -mms-bitfields" CPPFLAGS="$CPPFLAGS -mms-bitfields" SHOBJLDFLAGS='-shared -Wl,--enable-auto-image-base -Wl,--output-def,$[@].def,--out-implib,$[@].a' ;; esac fi ]) AC_DEFUN([SHOBJ_SET_SONAME], [ SAVE_LDFLAGS="$LDFLAGS" AC_MSG_CHECKING([how to specify soname]) for try in "-Wl,--soname,$1" "Wl,-install_name,$1" '__fail__'; do LDFLAGS="$SAVE_LDFLAGS" |
| ︙ | ︙ | |||
193 194 195 196 197 198 199 | break ]) done AC_SUBST(SHOBJLDFLAGS) ]) | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
break
])
done
AC_SUBST(SHOBJLDFLAGS)
])
dnl $1 = Description to show user
dnl $2 = Libraries to link to
dnl $3 = Variable to update (optional; default LIBS)
dnl $4 = Action to run if found
dnl $5 = Action to run if not found
AC_DEFUN([SHOBJ_DO_STATIC_LINK_LIB], [
ifelse($3, [], [
define([VAR_TO_UPDATE], [LIBS])
], [
define([VAR_TO_UPDATE], [$3])
])
AC_MSG_CHECKING([for how to statically link to $1])
trylink_ADD_LDFLAGS=''
for arg in $VAR_TO_UPDATE; do
case "${arg}" in
-L*)
trylink_ADD_LDFLAGS="${arg}"
;;
esac
done
SAVELIBS="$LIBS"
staticlib=""
found="0"
dnl HP/UX uses -Wl,-a,archive ... -Wl,-a,shared_archive
dnl Linux and Solaris us -Wl,-Bstatic ... -Wl,-Bdynamic
AC_LANG_PUSH([C])
for trylink in "-Wl,-a,archive $2 -Wl,-a,shared_archive" "-Wl,-Bstatic $2 -Wl,-Bdynamic" "$2"; do
if echo " ${LDFLAGS} " | grep ' -static ' >/dev/null; then
if test "${trylink}" != "$2"; then
continue
fi
fi
LIBS="${SAVELIBS} ${trylink_ADD_LDFLAGS} ${trylink}"
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [
staticlib="${trylink}"
found="1"
break
])
done
AC_LANG_POP([C])
LIBS="${SAVELIBS}"
if test "${found}" = "1"; then
new_RESULT=''
SAVERESULT="$VAR_TO_UPDATE"
for lib in ${SAVERESULT}; do
addlib='1'
for removelib in $2; do
if test "${lib}" = "${removelib}"; then
addlib='0'
break
fi
done
if test "$addlib" = '1'; then
new_RESULT="${new_RESULT} ${lib}"
fi
done
VAR_TO_UPDATE="${new_RESULT} ${staticlib}"
AC_MSG_RESULT([${staticlib}])
$4
else
AC_MSG_RESULT([cant])
$5
fi
])
|
Modified aclocal/tcl.m4
from [7fd1e39b5f]
to [71c8f9aee7].
1 2 3 4 | dnl Tcl M4 Routines dnl Must call AC_CANONICAL_HOST before calling us AC_DEFUN([TCLEXT_FIND_TCLCONFIG], [ | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > < > > > > > > > > | > > > > > > > < < < < < < < < < < < < < < < < > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
dnl Tcl M4 Routines
dnl Find a runnable Tcl
AC_DEFUN([TCLEXT_FIND_TCLSH_PROG], [
AC_CACHE_CHECK([runnable tclsh], [tcl_cv_tclsh_native_path], [
dnl Try to find a runnable tclsh
if test -z "$TCLCONFIGPATH"; then
TCLCONFIGPATH=/dev/null/null
fi
for try_tclsh in "$TCLSH_NATIVE" "$TCLCONFIGPATH/../bin/tclsh" \
"$TCLCONFIGPATH/../bin/tclsh8.6" \
"$TCLCONFIGPATH/../bin/tclsh8.5" \
"$TCLCONFIGPATH/../bin/tclsh8.4" \
`which tclsh 2>/dev/null` \
`which tclsh8.6 2>/dev/null` \
`which tclsh8.5 2>/dev/null` \
`which tclsh8.4 2>/dev/null` \
tclsh; do
if test -z "$try_tclsh"; then
continue
fi
if test -x "$try_tclsh"; then
if echo 'exit 0' | "$try_tclsh" 2>/dev/null >/dev/null; then
tcl_cv_tclsh_native_path="$try_tclsh"
break
fi
fi
done
if test "$TCLCONFIGPATH" = '/dev/null/null'; then
unset TCLCONFIGPATH
fi
])
TCLSH_PROG="${tcl_cv_tclsh_native_path}"
AC_SUBST(TCLSH_PROG)
])
dnl Must call AC_CANONICAL_HOST before calling us
AC_DEFUN([TCLEXT_FIND_TCLCONFIG], [
TCLCONFIGPATH=""
AC_ARG_WITH([tcl], AS_HELP_STRING([--with-tcl], [directory containing tcl configuration (tclConfig.sh)]), [
if test "x$withval" = "xno"; then
AC_MSG_ERROR([cant build without tcl])
fi
TCLCONFIGPATH="$withval"
], [
if test "$cross_compiling" = 'no'; then
TCLEXT_FIND_TCLSH_PROG
tclConfigCheckDir="`echo 'puts [[tcl::pkgconfig get libdir,runtime]]' | "$TCLSH_PROG" 2>/dev/null`"
else
tclConfigCheckDir=/dev/null/null
fi
if test "$cross_compiling" = 'no'; then
dirs="/usr/$host_alias/lib /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64"
else
dirs=''
fi
for dir in "$tclConfigCheckDir" $dirs; do
if test -f "$dir/tclConfig.sh"; then
TCLCONFIGPATH="$dir"
break
fi
done
])
AC_MSG_CHECKING([for path to tclConfig.sh])
if test -z "$TCLCONFIGPATH"; then
AC_MSG_ERROR([unable to locate tclConfig.sh. Try --with-tcl.])
fi
AC_SUBST(TCLCONFIGPATH)
AC_MSG_RESULT([$TCLCONFIGPATH])
dnl Find Tcl if we haven't already
if test -z "$TCLSH_PROG"; then
TCLEXT_FIND_TCLSH_PROG
fi
])
dnl Must define TCLCONFIGPATH before calling us (i.e., by TCLEXT_FIND_TCLCONFIG)
AC_DEFUN([TCLEXT_LOAD_TCLCONFIG], [
AC_MSG_CHECKING([for working tclConfig.sh])
if test -f "$TCLCONFIGPATH/tclConfig.sh"; then
|
| ︙ | ︙ | |||
63 64 65 66 67 68 69 70 71 72 73 74 75 76 | AC_DEFUN([TCLEXT_INIT], [ AC_CANONICAL_HOST TCLEXT_FIND_TCLCONFIG TCLEXT_LOAD_TCLCONFIG AC_DEFINE_UNQUOTED([MODULE_SCOPE], [static], [Define how to declare a function should only be visible to the current module]) AC_ARG_ENABLE([stubs], AS_HELP_STRING([--disable-stubs], [disable use of Tcl stubs]), [ if test "$enableval" = "no"; then TCL_SUPPORTS_STUBS=0 else TCL_SUPPORTS_STUBS=1 fi | > > > > > > > > | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | AC_DEFUN([TCLEXT_INIT], [ AC_CANONICAL_HOST TCLEXT_FIND_TCLCONFIG TCLEXT_LOAD_TCLCONFIG AC_DEFINE_UNQUOTED([MODULE_SCOPE], [static], [Define how to declare a function should only be visible to the current module]) TCLEXT_BUILD='shared' AC_ARG_ENABLE([static], AS_HELP_STRING([--enable-static], [enable a static build]), [ if test "$enableval" = "yes"; then TCLEXT_BUILD='static' TCL_SUPPORTS_STUBS=0 fi ]) AC_ARG_ENABLE([stubs], AS_HELP_STRING([--disable-stubs], [disable use of Tcl stubs]), [ if test "$enableval" = "no"; then TCL_SUPPORTS_STUBS=0 else TCL_SUPPORTS_STUBS=1 fi |
| ︙ | ︙ | |||
86 87 88 89 90 91 92 |
LIBS="${LIBS} ${TCL_LIB_SPEC}"
fi
TCL_INCLUDE_SPEC="`eval echo "${TCL_INCLUDE_SPEC}"`"
CFLAGS="${CFLAGS} ${TCL_INCLUDE_SPEC}"
CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC}"
| > | > > > > > > > > > > | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
LIBS="${LIBS} ${TCL_LIB_SPEC}"
fi
TCL_INCLUDE_SPEC="`eval echo "${TCL_INCLUDE_SPEC}"`"
CFLAGS="${CFLAGS} ${TCL_INCLUDE_SPEC}"
CPPFLAGS="${CPPFLAGS} ${TCL_INCLUDE_SPEC}"
TCL_DEFS_TCL_ONLY=`(
eval "set -- ${TCL_DEFS}"
for flag in "[$]@"; do
case "${flag}" in
-DTCL_*)
echo "${flag}" | sed "s/'/'\\''/g" | sed "s@^@'@;s@"'[$]'"@'@" | tr $'\n' ' '
;;
esac
done
)`
TCL_DEFS="${TCL_DEFS_TCL_ONLY}"
AC_SUBST(TCL_DEFS)
dnl Needed for package installation
TCL_PACKAGE_PATH="`echo "${TCL_PACKAGE_PATH}" | sed 's@ *$''@@' | awk '{ print [$]1 }'`"
AC_SUBST(TCL_PACKAGE_PATH)
AC_SUBST(LIBS)
])
|
Modified build/autogen.sh
from [f56e71ada1]
to [53ac1b1339].
1 2 3 4 5 6 7 8 9 10 |
#! /usr/bin/env bash
# Download latest copy of autoconf macros
(
mkdir aclocal >/dev/null 2>/dev/null
cd aclocal || exit 1
for file in shobj.m4 tcl.m4 versionscript.m4; do
rm -f "${file}"
| | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
#! /usr/bin/env bash
# Download latest copy of autoconf macros
(
mkdir aclocal >/dev/null 2>/dev/null
cd aclocal || exit 1
for file in shobj.m4 tcl.m4 versionscript.m4; do
rm -f "${file}"
wget -O "${file}.new" "http://chiselapp.com/user/rkeene/repository/autoconf/doc/trunk/${file}" || continue
mv "${file}.new" "${file}"
done
)
for file in config.guess config.sub install-sh; do
rm -f "${file}"
|
| ︙ | ︙ |
Modified configure.ac
from [09c35b571c]
to [1f51af3ae0].
| ︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 | AC_PROG_MAKE_SET AC_PROG_INSTALL AC_GNU_SOURCE AC_LANG(C) dnl Determine system information DC_CHK_OS_INFO dnl Determine if a shared or static build is requested | > > > < < | < < < < < < | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_GNU_SOURCE
AC_LANG(C)
dnl Determine system information
DC_CHK_OS_INFO
dnl Perform Tcl Extension required stuff
TCLEXT_INIT
dnl Determine if a shared or static build is requested
TCC4TCL_TARGET="${TCLEXT_BUILD}"
dnl Configure TCC build options
AC_SUBST(TCC_CONFIGURE_OPTS)
TCC_CONFIGURE_OPTS=""
if test "${TCC4TCL_TARGET}" = "shared"; then
dnl Determine how to make shared objects
|
| ︙ | ︙ | |||
84 85 86 87 88 89 90 | ;; esac AC_SUBST(HOST_PATH_SEPARATOR) dnl Find a suitable awk AC_CHECK_TOOLS(AWK, gawk awk, [false]) | < < < | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
;;
esac
AC_SUBST(HOST_PATH_SEPARATOR)
dnl Find a suitable awk
AC_CHECK_TOOLS(AWK, gawk awk, [false])
dnl This must be done last since it breaks the compilation
if test "${TCC4TCL_TARGET}" = "shared"; then
DC_SETUP_STABLE_API([${srcdir}/tcc4tcl.vers], [tcc4tcl.syms])
fi
dnl Produce output
AC_OUTPUT(Makefile pkgIndex.tcl tcc4tcl.syms)
|