Updated aclocal.m4 using Bakefile's CVS HEAD bakefile.m4 with

BAKEFILE_BAKEFILE_M4_VERSION set back to 0.1.4.
- Adds support for Metrowerks compilers.
- Improves dllar.sh used on OS/2.
- Allows autoconf to invalidate its cache when autoconf_inc.m4 is changed.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott
2005-01-19 03:42:42 +00:00
parent f0bce4d4e0
commit b1d22ded8d
2 changed files with 186 additions and 49 deletions

133
aclocal.m4 vendored
View File

@@ -1286,7 +1286,37 @@ dnl ---------------------------------------------------------------------------
dnl Lots of compiler & linker detection code contained here was taken from dnl Lots of compiler & linker detection code contained here was taken from
dnl wxWindows configure.in script (see http://www.wxwindows.org) dnl wxWindows configure.in script (see http://www.wxwindows.org)
dnl Based on autoconf _AC_LANG_COMPILER_GNU
AC_DEFUN([_AC_BAKEFILE_LANG_COMPILER_MWERKS],
[AC_CACHE_CHECK([whether we are using the Metrowerks _AC_LANG compiler],
[bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_mwerks],
[AC_TRY_COMPILE([],[#ifndef __MWERKS__
choke me
#endif
],
[bakefile_compiler_mwerks=yes],
[bakefile_compiler_mwerks=no])
bakefile_cv_[]_AC_LANG_ABBREV[]_compiler_mwerks=$bakefile_compiler_mwerks
])
])
dnl Loosely based on autoconf AC_PROG_CC
dnl TODO: Maybe this should wrap the call to AC_PROG_CC and be used instead.
AC_DEFUN([AC_BAKEFILE_PROG_MWCC],
[AC_LANG_PUSH(C)
_AC_BAKEFILE_LANG_COMPILER_MWERKS
MWCC=`test $bakefile_compiler_mwerks = yes && echo yes`
AC_LANG_POP(C)
])
dnl Loosely based on autoconf AC_PROG_CXX
dnl TODO: Maybe this should wrap the call to AC_PROG_CXX and be used instead.
AC_DEFUN([AC_BAKEFILE_PROG_MWCXX],
[AC_LANG_PUSH(C++)
_AC_BAKEFILE_LANG_COMPILER_MWERKS
MWCXX=`test $bakefile_compiler_mwerks = yes && echo yes`
AC_LANG_POP(C++)
])
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl AC_BAKEFILE_GNUMAKE dnl AC_BAKEFILE_GNUMAKE
@@ -1649,8 +1679,8 @@ AC_DEFUN([AC_BAKEFILE_SHARED_LD],
;; ;;
*-pc-os2_emx | *-pc-os2-emx ) *-pc-os2_emx | *-pc-os2-emx )
SHARED_LD_CC="`pwd`/dllar.sh -o" SHARED_LD_CC="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
SHARED_LD_CXX="`pwd`/dllar.sh -o" SHARED_LD_CXX="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
PIC_FLAG="" PIC_FLAG=""
AC_BAKEFILE_CREATE_FILE_DLLAR_SH AC_BAKEFILE_CREATE_FILE_DLLAR_SH
chmod +x dllar.sh chmod +x dllar.sh
@@ -1704,14 +1734,7 @@ AC_DEFUN([AC_BAKEFILE_SHARED_VERSIONS],
SONAME_FLAG= SONAME_FLAG=
case "${BAKEFILE_HOST}" in case "${BAKEFILE_HOST}" in
*-*-linux* ) *-*-linux* | *-*-freebsd* )
SONAME_FLAG="-Wl,-soname,"
USE_SOVERSION=1
USE_SOVERLINUX=1
USE_SOSYMLINKS=1
;;
*-*-freebsd* )
SONAME_FLAG="-Wl,-soname," SONAME_FLAG="-Wl,-soname,"
USE_SOVERSION=1 USE_SOVERSION=1
USE_SOVERLINUX=1 USE_SOVERLINUX=1
@@ -1766,6 +1789,11 @@ AC_DEFUN([AC_BAKEFILE_DEPS],
;; ;;
esac esac
AC_MSG_RESULT([gcc]) AC_MSG_RESULT([gcc])
elif test "x$MWCC" = "xyes"; then
DEPSMODE=mwcc
DEPS_TRACKING=1
DEPSFLAG_MWCC="-MM"
AC_MSG_RESULT([mwcc])
else else
AC_MSG_RESULT([none]) AC_MSG_RESULT([none])
fi fi
@@ -1937,7 +1965,7 @@ AC_DEFUN([AC_BAKEFILE],
BAKEFILE_BAKEFILE_M4_VERSION="0.1.4" BAKEFILE_BAKEFILE_M4_VERSION="0.1.4"
builtin(include, autoconf_inc.m4) m4_include([autoconf_inc.m4])
if test "$BAKEFILE_BAKEFILE_M4_VERSION" != "$BAKEFILE_AUTOCONF_INC_M4_VERSION" ; then if test "$BAKEFILE_BAKEFILE_M4_VERSION" != "$BAKEFILE_AUTOCONF_INC_M4_VERSION" ; then
AC_MSG_ERROR([Versions of Bakefile used to generate makefiles ($BAKEFILE_AUTOCONF_INC_M4_VERSION) and configure ($BAKEFILE_BAKEFILE_M4_VERSION) do not match.]) AC_MSG_ERROR([Versions of Bakefile used to generate makefiles ($BAKEFILE_AUTOCONF_INC_M4_VERSION) and configure ($BAKEFILE_BAKEFILE_M4_VERSION) do not match.])
@@ -2048,10 +2076,11 @@ CleanUp() {
# Print usage and exit script with rc=1. # Print usage and exit script with rc=1.
PrintHelp() { PrintHelp() {
echo 'Usage: dllar @<:@-o@<:${utput}:>@ output_file@:>@ @<:@-i@<:${mport}:>@ importlib_name@:>@' echo 'Usage: dllar.sh @<:@-o@<:@utput@:>@ output_file@:>@ @<:@-i@<:@mport@:>@ importlib_name@:>@'
echo ' @<:@-d@<:${escription}:>@ "dll descrption"@:>@ @<:@-cc "CC"@:>@ @<:@-f@<:${lags}:>@ "CFLAGS"@:>@' echo ' @<:@-name-mangler-script script.sh@:>@'
echo ' @<:@-ord@<:${inals}:>@@:>@ -ex@<:${clude}:>@ "symbol(s)"' echo ' @<:@-d@<:@escription@:>@ "dll descrption"@:>@ @<:@-cc "CC"@:>@ @<:@-f@<:@lags@:>@ "CFLAGS"@:>@'
echo ' @<:@-libf@<:${lags}:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"@:>@ @<:@-nocrt@<:${dll}:>@@:>@ @<:@-nolxl@<:${ite}:>@@:>@' echo ' @<:@-ord@<:@inals@:>@@:>@ -ex@<:@clude@:>@ "symbol(s)"'
echo ' @<:@-libf@<:@lags@:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"@:>@ @<:@-nocrt@<:@dll@:>@@:>@ @<:@-nolxl@<:@ite@:>@@:>@'
echo ' @<:@*.o@:>@ @<:@*.a@:>@' echo ' @<:@*.o@:>@ @<:@*.a@:>@'
echo '*> "output_file" should have no extension.' echo '*> "output_file" should have no extension.'
echo ' If it has the .o, .a or .dll extension, it is automatically removed.' echo ' If it has the .o, .a or .dll extension, it is automatically removed.'
@@ -2062,19 +2091,26 @@ PrintHelp() {
echo ' This name is used as the import library name and may be longer and' echo ' This name is used as the import library name and may be longer and'
echo ' more descriptive than the DLL name which has to follow the old ' echo ' more descriptive than the DLL name which has to follow the old '
echo ' 8.3 convention of FAT.' echo ' 8.3 convention of FAT.'
echo '*> "script.sh may be given to override the output_file name by a'
echo ' different name. It is mainly useful if the regular make process'
echo ' of some package does not take into account OS/2 restriction of'
echo ' DLL name lengths. It takes the importlib name as input and is'
echo ' supposed to procude a shorter name as output. The script should'
echo ' expect to get importlib_name without extension and should produce'
echo ' a (max.) 8 letter name without extension.'
echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)' echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)'
echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)' echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)'
echo ' These flags will be put at the start of GCC command line.' echo ' These flags will be put at the start of GCC command line.'
echo '*> -ord@<:${inals}:>@ tells dllar to export entries by ordinals. Be careful.' echo '*> -ord@<:@inals@:>@ tells dllar to export entries by ordinals. Be careful.'
echo '*> -ex@<:${clude}:>@ defines symbols which will not be exported. You can define' echo '*> -ex@<:@clude@:>@ defines symbols which will not be exported. You can define'
echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".' echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".'
echo ' If the last character of a symbol is "*", all symbols beginning' echo ' If the last character of a symbol is "*", all symbols beginning'
echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).' echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).'
echo '*> -libf@<:${lags}:>@ can be used to add INITGLOBAL/INITINSTANCE and/or' echo '*> -libf@<:@lags@:>@ can be used to add INITGLOBAL/INITINSTANCE and/or'
echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.' echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.'
echo '*> -nocrt@<:${dll}:>@ switch will disable linking the library against emx''s' echo '*> -nocrt@<:@dll@:>@ switch will disable linking the library against emx''s'
echo ' C runtime DLLs.' echo ' C runtime DLLs.'
echo '*> -nolxl@<:${ite}:>@ switch will disable running lxlite on the resulting DLL.' echo '*> -nolxl@<:@ite@:>@ switch will disable running lxlite on the resulting DLL.'
echo '*> All other switches (for example -L./ or -lmylib) will be passed' echo '*> All other switches (for example -L./ or -lmylib) will be passed'
echo ' unchanged to GCC at the end of command line.' echo ' unchanged to GCC at the end of command line.'
echo '*> If you create a DLL from a library and you do not specify -o,' echo '*> If you create a DLL from a library and you do not specify -o,'
@@ -2111,6 +2147,7 @@ cmdLine=${D}*
outFile="" outFile=""
outimpFile="" outimpFile=""
inputFiles="" inputFiles=""
renameScript=""
description="" description=""
CC=gcc.exe CC=gcc.exe
CFLAGS="-s -Zcrtdll" CFLAGS="-s -Zcrtdll"
@@ -2129,6 +2166,7 @@ case ${D}curDirS in
esac esac
# Parse commandline # Parse commandline
libsToLink=0 libsToLink=0
omfLinking=0
while @<:@ ${D}1 @:>@; do while @<:@ ${D}1 @:>@; do
case ${D}1 in case ${D}1 in
-ord*) -ord*)
@@ -2142,6 +2180,10 @@ while @<:@ ${D}1 @:>@; do
shift shift
outimpFile=${D}1 outimpFile=${D}1
;; ;;
-name-mangler-script)
shift
renameScript=${D}1
;;
-d*) -d*)
shift shift
description=${D}1 description=${D}1
@@ -2176,11 +2218,22 @@ while @<:@ ${D}1 @:>@; do
-L* | -l*) -L* | -l*)
libsToLink=1 libsToLink=1
;; ;;
-Zomf)
omfLinking=1
;;
*) *)
;; ;;
esac esac
EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1 EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
;; ;;
*.dll)
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`"
if @<:@ ${D}omfLinking -eq 1 @:>@; then
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib"
else
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a"
fi
;;
*) *)
found=0; found=0;
if @<:@ ${D}libsToLink -ne 0 @:>@; then if @<:@ ${D}libsToLink -ne 0 @:>@; then
@@ -2311,9 +2364,13 @@ fi
defFile="${D}{outFile}.def" defFile="${D}{outFile}.def"
arcFile="${D}{outimpFile}.a" arcFile="${D}{outimpFile}.a"
arcFile2="${D}{outimpFile}.lib" arcFile2="${D}{outimpFile}.lib"
dllFile="${D}outFile"
# Add suffix to dllFile later, first we need a version to use as #create ${D}dllFile as something matching 8.3 restrictions,
# name in .def file. if @<:@ -z ${D}renameScript @:>@ ; then
dllFile="${D}outFile"
else
dllFile=\`${D}renameScript ${D}outimpFile\`
fi
if @<:@ ${D}do_backup -ne 0 @:>@ ; then if @<:@ ${D}do_backup -ne 0 @:>@ ; then
if @<:@ -f ${D}arcFile @:>@ ; then if @<:@ -f ${D}arcFile @:>@ ; then
@@ -2340,8 +2397,8 @@ done
# Create the def file. # Create the def file.
rm -f ${D}defFile rm -f ${D}defFile
echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile
dllFile="${D}dllFile.dll" dllFile="${D}{dllFile}.dll"
if @<:@ -n ${D}description @:>@; then if @<:@ ! -z ${D}description @:>@; then
echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile
fi fi
echo "EXPORTS" >> ${D}defFile echo "EXPORTS" >> ${D}defFile
@@ -2417,6 +2474,7 @@ cat <<EOF >bk-deps
DEPSMODE=${DEPSMODE} DEPSMODE=${DEPSMODE}
DEPSDIR=.deps DEPSDIR=.deps
DEPSFLAG_GCC="${DEPSFLAG_GCC}" DEPSFLAG_GCC="${DEPSFLAG_GCC}"
DEPSFLAG_MWCC="${DEPSFLAG_MWCC}"
mkdir -p ${D}DEPSDIR mkdir -p ${D}DEPSDIR
@@ -2454,6 +2512,31 @@ if test ${D}DEPSMODE = gcc ; then
fi fi
fi fi
exit 0 exit 0
elif test ${D}DEPSMODE = mwcc ; then
${D}*
status=${D}?
if test ${D}{status} != 0 ; then
exit ${D}{status}
fi
# Run mwcc again with -MM and redirect into the dep file we want
# NOTE: We can't use shift here because we need ${D}* to be valid
prevarg=
for arg in ${D}* ; do
if test "${D}prevarg" = "-o"; then
objfile=${D}arg
else
case "${D}arg" in
-* )
;;
* )
srcfile=${D}arg
;;
esac
fi
prevarg="${D}arg"
done
${D}* ${D}DEPSFLAG_MWCC >${D}{DEPSDIR}/${D}{objfile}.d
exit 0
else else
${D}* ${D}*
exit ${D}? exit ${D}?

102
configure vendored
View File

@@ -39661,8 +39661,8 @@ fi
;; ;;
*-pc-os2_emx | *-pc-os2-emx ) *-pc-os2_emx | *-pc-os2-emx )
SHARED_LD_CC="`pwd`/dllar.sh -o" SHARED_LD_CC="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
SHARED_LD_CXX="`pwd`/dllar.sh -o" SHARED_LD_CXX="`pwd`/dllar.sh -libf INITINSTANCE -libf TERMINSTANCE -o"
PIC_FLAG="" PIC_FLAG=""
D='$' D='$'
@@ -39761,10 +39761,11 @@ CleanUp() {
# Print usage and exit script with rc=1. # Print usage and exit script with rc=1.
PrintHelp() { PrintHelp() {
echo 'Usage: dllar [-o@<:${utput}:>@ output_file] [-i@<:${mport}:>@ importlib_name]' echo 'Usage: dllar.sh [-o[utput] output_file] [-i[mport] importlib_name]'
echo ' [-d@<:${escription}:>@ "dll descrption"] [-cc "CC"] [-f@<:${lags}:>@ "CFLAGS"]' echo ' [-name-mangler-script script.sh]'
echo ' [-ord@<:${inals}:>@] -ex@<:${clude}:>@ "symbol(s)"' echo ' [-d[escription] "dll descrption"] [-cc "CC"] [-f[lags] "CFLAGS"]'
echo ' [-libf@<:${lags}:>@ "{INIT|TERM}{GLOBAL|INSTANCE}"] [-nocrt@<:${dll}:>@] [-nolxl@<:${ite}:>@]' echo ' [-ord[inals]] -ex[clude] "symbol(s)"'
echo ' [-libf[lags] "{INIT|TERM}{GLOBAL|INSTANCE}"] [-nocrt[dll]] [-nolxl[ite]]'
echo ' [*.o] [*.a]' echo ' [*.o] [*.a]'
echo '*> "output_file" should have no extension.' echo '*> "output_file" should have no extension.'
echo ' If it has the .o, .a or .dll extension, it is automatically removed.' echo ' If it has the .o, .a or .dll extension, it is automatically removed.'
@@ -39775,19 +39776,26 @@ PrintHelp() {
echo ' This name is used as the import library name and may be longer and' echo ' This name is used as the import library name and may be longer and'
echo ' more descriptive than the DLL name which has to follow the old ' echo ' more descriptive than the DLL name which has to follow the old '
echo ' 8.3 convention of FAT.' echo ' 8.3 convention of FAT.'
echo '*> "script.sh may be given to override the output_file name by a'
echo ' different name. It is mainly useful if the regular make process'
echo ' of some package does not take into account OS/2 restriction of'
echo ' DLL name lengths. It takes the importlib name as input and is'
echo ' supposed to procude a shorter name as output. The script should'
echo ' expect to get importlib_name without extension and should produce'
echo ' a (max.) 8 letter name without extension.'
echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)' echo '*> "cc" is used to use another GCC executable. (default: gcc.exe)'
echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)' echo '*> "flags" should be any set of valid GCC flags. (default: -s -Zcrtdll)'
echo ' These flags will be put at the start of GCC command line.' echo ' These flags will be put at the start of GCC command line.'
echo '*> -ord@<:${inals}:>@ tells dllar to export entries by ordinals. Be careful.' echo '*> -ord[inals] tells dllar to export entries by ordinals. Be careful.'
echo '*> -ex@<:${clude}:>@ defines symbols which will not be exported. You can define' echo '*> -ex[clude] defines symbols which will not be exported. You can define'
echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".' echo ' multiple symbols, for example -ex "myfunc yourfunc _GLOBAL*".'
echo ' If the last character of a symbol is "*", all symbols beginning' echo ' If the last character of a symbol is "*", all symbols beginning'
echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).' echo ' with the prefix before "*" will be exclude, (see _GLOBAL* above).'
echo '*> -libf@<:${lags}:>@ can be used to add INITGLOBAL/INITINSTANCE and/or' echo '*> -libf[lags] can be used to add INITGLOBAL/INITINSTANCE and/or'
echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.' echo ' TERMGLOBAL/TERMINSTANCE flags to the dynamically-linked library.'
echo '*> -nocrt@<:${dll}:>@ switch will disable linking the library against emx''s' echo '*> -nocrt[dll] switch will disable linking the library against emx''s'
echo ' C runtime DLLs.' echo ' C runtime DLLs.'
echo '*> -nolxl@<:${ite}:>@ switch will disable running lxlite on the resulting DLL.' echo '*> -nolxl[ite] switch will disable running lxlite on the resulting DLL.'
echo '*> All other switches (for example -L./ or -lmylib) will be passed' echo '*> All other switches (for example -L./ or -lmylib) will be passed'
echo ' unchanged to GCC at the end of command line.' echo ' unchanged to GCC at the end of command line.'
echo '*> If you create a DLL from a library and you do not specify -o,' echo '*> If you create a DLL from a library and you do not specify -o,'
@@ -39824,6 +39832,7 @@ cmdLine=${D}*
outFile="" outFile=""
outimpFile="" outimpFile=""
inputFiles="" inputFiles=""
renameScript=""
description="" description=""
CC=gcc.exe CC=gcc.exe
CFLAGS="-s -Zcrtdll" CFLAGS="-s -Zcrtdll"
@@ -39842,6 +39851,7 @@ case ${D}curDirS in
esac esac
# Parse commandline # Parse commandline
libsToLink=0 libsToLink=0
omfLinking=0
while [ ${D}1 ]; do while [ ${D}1 ]; do
case ${D}1 in case ${D}1 in
-ord*) -ord*)
@@ -39855,6 +39865,10 @@ while [ ${D}1 ]; do
shift shift
outimpFile=${D}1 outimpFile=${D}1
;; ;;
-name-mangler-script)
shift
renameScript=${D}1
;;
-d*) -d*)
shift shift
description=${D}1 description=${D}1
@@ -39889,11 +39903,22 @@ while [ ${D}1 ]; do
-L* | -l*) -L* | -l*)
libsToLink=1 libsToLink=1
;; ;;
-Zomf)
omfLinking=1
;;
*) *)
;; ;;
esac esac
EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1 EXTRA_CFLAGS=${D}{EXTRA_CFLAGS}" "${D}1
;; ;;
*.dll)
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS} \`basnam ${D}1 .dll\`"
if [ ${D}omfLinking -eq 1 ]; then
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.lib"
else
EXTRA_CFLAGS="${D}{EXTRA_CFLAGS}.a"
fi
;;
*) *)
found=0; found=0;
if [ ${D}libsToLink -ne 0 ]; then if [ ${D}libsToLink -ne 0 ]; then
@@ -40024,9 +40049,13 @@ fi
defFile="${D}{outFile}.def" defFile="${D}{outFile}.def"
arcFile="${D}{outimpFile}.a" arcFile="${D}{outimpFile}.a"
arcFile2="${D}{outimpFile}.lib" arcFile2="${D}{outimpFile}.lib"
dllFile="${D}outFile"
# Add suffix to dllFile later, first we need a version to use as #create ${D}dllFile as something matching 8.3 restrictions,
# name in .def file. if [ -z ${D}renameScript ] ; then
dllFile="${D}outFile"
else
dllFile=\`${D}renameScript ${D}outimpFile\`
fi
if [ ${D}do_backup -ne 0 ] ; then if [ ${D}do_backup -ne 0 ] ; then
if [ -f ${D}arcFile ] ; then if [ -f ${D}arcFile ] ; then
@@ -40053,8 +40082,8 @@ done
# Create the def file. # Create the def file.
rm -f ${D}defFile rm -f ${D}defFile
echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile echo "LIBRARY \`basnam ${D}dllFile\` ${D}library_flags" >> ${D}defFile
dllFile="${D}dllFile.dll" dllFile="${D}{dllFile}.dll"
if [ -n ${D}description ]; then if [ ! -z ${D}description ]; then
echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile echo "DESCRIPTION \\"${D}{description}\\"" >> ${D}defFile
fi fi
echo "EXPORTS" >> ${D}defFile echo "EXPORTS" >> ${D}defFile
@@ -40156,14 +40185,7 @@ echo "$as_me: error: unknown system type $BAKEFILE_HOST." >&2;}
SONAME_FLAG= SONAME_FLAG=
case "${BAKEFILE_HOST}" in case "${BAKEFILE_HOST}" in
*-*-linux* ) *-*-linux* | *-*-freebsd* )
SONAME_FLAG="-Wl,-soname,"
USE_SOVERSION=1
USE_SOVERLINUX=1
USE_SOSYMLINKS=1
;;
*-*-freebsd* )
SONAME_FLAG="-Wl,-soname," SONAME_FLAG="-Wl,-soname,"
USE_SOVERSION=1 USE_SOVERSION=1
USE_SOVERLINUX=1 USE_SOVERLINUX=1
@@ -40209,6 +40231,12 @@ echo $ECHO_N "checking for dependency tracking method... $ECHO_C" >&6
esac esac
echo "$as_me:$LINENO: result: gcc" >&5 echo "$as_me:$LINENO: result: gcc" >&5
echo "${ECHO_T}gcc" >&6 echo "${ECHO_T}gcc" >&6
elif test "x$MWCC" = "xyes"; then
DEPSMODE=mwcc
DEPS_TRACKING=1
DEPSFLAG_MWCC="-MM"
echo "$as_me:$LINENO: result: mwcc" >&5
echo "${ECHO_T}mwcc" >&6
else else
echo "$as_me:$LINENO: result: none" >&5 echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6 echo "${ECHO_T}none" >&6
@@ -40228,6 +40256,7 @@ cat <<EOF >bk-deps
DEPSMODE=${DEPSMODE} DEPSMODE=${DEPSMODE}
DEPSDIR=.deps DEPSDIR=.deps
DEPSFLAG_GCC="${DEPSFLAG_GCC}" DEPSFLAG_GCC="${DEPSFLAG_GCC}"
DEPSFLAG_MWCC="${DEPSFLAG_MWCC}"
mkdir -p ${D}DEPSDIR mkdir -p ${D}DEPSDIR
@@ -40265,6 +40294,31 @@ if test ${D}DEPSMODE = gcc ; then
fi fi
fi fi
exit 0 exit 0
elif test ${D}DEPSMODE = mwcc ; then
${D}*
status=${D}?
if test ${D}{status} != 0 ; then
exit ${D}{status}
fi
# Run mwcc again with -MM and redirect into the dep file we want
# NOTE: We can't use shift here because we need ${D}* to be valid
prevarg=
for arg in ${D}* ; do
if test "${D}prevarg" = "-o"; then
objfile=${D}arg
else
case "${D}arg" in
-* )
;;
* )
srcfile=${D}arg
;;
esac
fi
prevarg="${D}arg"
done
${D}* ${D}DEPSFLAG_MWCC >${D}{DEPSDIR}/${D}{objfile}.d
exit 0
else else
${D}* ${D}*
exit ${D}? exit ${D}?