X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/131f235d04ef7a192e5f553c74c7df45c526cfa2..9ffa72272ba67827a83993b1e3ec8a312ec88434:/aclocal.m4 diff --git a/aclocal.m4 b/aclocal.m4 index c1d387e5fe..65c388f329 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.7.2 -*- Autoconf -*- +# aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1111,14 +1111,18 @@ AC_DEFUN(AC_BAKEFILE_PLATFORM, PLATFORM_MSDOS=0 PLATFORM_MAC=0 PLATFORM_MACOSX=0 + PLATFORM_OS2=0 case "${host}" in *-*-cygwin* | *-*-mingw32* ) PLATFORM_WIN32=1 ;; - *-pc-msdosdjgpp | *-pc-os2_emx | *-pc-os2-emx ) + *-pc-msdosdjgpp ) PLATFORM_MSDOS=1 ;; + *-pc-os2_emx | *-pc-os2-emx ) + PLATFORM_OS2=1 + ;; powerpc-*-darwin* ) PLATFORM_MAC=1 PLATFORM_MACOSX=1 @@ -1133,6 +1137,7 @@ AC_DEFUN(AC_BAKEFILE_PLATFORM, AC_SUBST(PLATFORM_MSDOS) AC_SUBST(PLATFORM_MAC) AC_SUBST(PLATFORM_MACOSX) + AC_SUBST(PLATFORM_OS2) ]) @@ -1149,6 +1154,7 @@ AC_DEFUN(AC_BAKEFILE_SUFFIXES, SO_SUFFIX="so" SO_SUFFIX_MODULE="so" EXEEXT="" + LIBPREFIX=lib DLLPREFIX=lib DLLPREFIX_MODULE= @@ -1172,9 +1178,14 @@ AC_DEFUN(AC_BAKEFILE_SUFFIXES, EXEEXT=".exe" DLLPREFIX="" ;; - *-pc-msdosdjgpp | *-pc-os2_emx | *-pc-os2-emx ) + *-pc-msdosdjgpp ) + EXEEXT=".exe" + DLLPREFIX="" + ;; + *-pc-os2_emx | *-pc-os2-emx ) EXEEXT=".exe" DLLPREFIX="" + LIBPREFIX="" ;; powerpc-*-darwin* ) SO_SUFFIX="dylib" @@ -1185,6 +1196,7 @@ AC_DEFUN(AC_BAKEFILE_SUFFIXES, AC_SUBST(SO_SUFFIX) AC_SUBST(SO_SUFFIX_MODULE) AC_SUBST(EXEEXT) + AC_SUBST(LIBPREFIX) AC_SUBST(DLLPREFIX) AC_SUBST(DLLPREFIX_MODULE) ]) @@ -1266,7 +1278,27 @@ AC_DEFUN(AC_BAKEFILE_SHARED_LD, dnl or with a double stage link in order to create a single module dnl "-init _wxWindowsDylibInit" not useful with lazy linking solved - cat <shared-ld-sh + dnl If using newer dev tools then there is a -single_module flag that + dnl we can use to do this, otherwise we'll need to use a helper + dnl script. Check the version of gcc to see which way we can go: + AC_CACHE_CHECK([for gcc 3.1 or later], wx_cv_gcc31, [ + AC_TRY_COMPILE([], + [ + #if (__GNUC__ < 3) || \ + ((__GNUC__ == 3) && (__GNUC_MINOR__ < 1)) + #error old gcc + #endif + ], + [ + wx_cv_gcc31=yes + ], + [ + wx_cv_gcc31=no + ] + ) + ]) + if test "$wx_cv_gcc31" = "no"; then + cat <shared-ld-sh #!/bin/sh #----------------------------------------------------------------------------- #-- Name: distrib/mac/shared-ld-sh @@ -1353,17 +1385,22 @@ rm -f master.\$\$.o exit 0 EOF - chmod +x shared-ld-sh + chmod +x shared-ld-sh + + dnl Use the shared-ld-sh helper script + SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -o" + SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -o" + SHARED_LD_CXX="$SHARED_LD_CC" + SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" + else + dnl Use the -single_module flag and let the linker do it for us + SHARED_LD_CC="\${CC} -dynamiclib -single_module -o" + SHARED_LD_MODULE_CC="\${CC} -bundle -single_module -o" + SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -o" + SHARED_LD_MODULE_CXX="\${CXX} -bundle -single_module -o" + fi - SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -undefined suppress -flat_namespace -o" - SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -undefined suppress -flat_namespace -o" - SHARED_LD_CXX="$SHARED_LD_CC" - SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" PIC_FLAG="-dynamic -fPIC" - dnl FIXME - what about C libs? Gilles says to use c++ because it doesn't - dnl matter for C projects and matters for C++ ones - dnl FIXME - newer devel tools have linker flag to do this, the script - dnl is not necessary - detect! ;; *-*-aix* ) @@ -1401,6 +1438,7 @@ EOF *-*-sunos4* | \ *-*-osf* | \ *-*-dgux5* | \ + *-pc-os2_emx | *-pc-os2-emx | \ *-*-sysv5* ) dnl defaults are ok ;; @@ -1413,7 +1451,7 @@ EOF SHARED_LD_MODULE_CC="$SHARED_LD_CC" fi if test "x$SHARED_LD_MODULE_CXX" = "x" ; then - SHARED_LD_MODULE_CC="$SHARED_LD_CXX" + SHARED_LD_MODULE_CXX="$SHARED_LD_CXX" fi AC_SUBST(SHARED_LD_CC) @@ -1503,8 +1541,8 @@ AC_DEFUN(AC_BAKEFILE_DEPS, cat <bk-deps #!/bin/sh -# This script is part of Bakefile (http://bakefile.sf.net) autoconf script. -# It is used to track C/C++ files dependencies in portable way. +# This script is part of Bakefile (http://bakefile.sourceforge.net) autoconf +# script. It is used to track C/C++ files dependencies in portable way. # # Permission is given to use this file in any way. @@ -1575,13 +1613,9 @@ AC_DEFUN(AC_BAKEFILE_CHECK_BASIC_STUFF, AC_PROG_MAKE_SET AC_SUBST(MAKE_SET) - if test "$build" != "$host" ; then - AR=$host_alias-ar - STRIP=$host_alias-strip - else - AC_CHECK_PROG(AR, ar, ar, ar) - AC_CHECK_PROG(STRIP, strip, strip, true) - fi + AC_CHECK_TOOL(AR, ar, ar) + AC_CHECK_TOOL(STRIP, strip, :) + AC_CHECK_TOOL(NM, nm, :) case ${host} in *-hp-hpux* ) @@ -1632,6 +1666,103 @@ AC_DEFUN(AC_BAKEFILE_RES_COMPILERS, AC_SUBST(SETFILE) ]) +dnl --------------------------------------------------------------------------- +dnl AC_BAKEFILE_PRECOMP_HEADERS +dnl +dnl Check for precompiled headers support (GCC >= 3.4) +dnl --------------------------------------------------------------------------- + +AC_DEFUN(AC_BAKEFILE_PRECOMP_HEADERS, +[ + + AC_ARG_ENABLE([precomp-headers], + [ --disable-precomp-headers don't use precompiled headers even if compiler can], + [bk_use_pch="$enableval"]) + + GCC_PCH=0 + + if test "x$bk_use_pch" = "x" -o "x$bk_use_pch" = "xyes" ; then + if test "x$GCC" = "xyes"; then + dnl test if we have gcc-3.4: + AC_MSG_CHECKING([if the compiler supports precompiled headers]) + AC_TRY_COMPILE([], + [ + #if !defined(__GNUC__) || !defined(__GNUC_MINOR__) + #error "no pch support" + #endif + #if (__GNUC__ < 3) + #error "no pch support" + #endif + #if (__GNUC__ == 3) && \ + ((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \ + ( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) + #error "no pch support" + #endif + ], + [ + AC_MSG_RESULT([yes]) + dnl FIXME - this is temporary, till .gch dependencies + dnl are fixed in generated Makefiles + CPPFLAGS="-fpch-deps $CPPFLAGS" + GCC_PCH=1 + ], + [ + AC_MSG_RESULT([no]) + ]) + if test $GCC_PCH = 1 ; then + cat <bk-make-pch +#!/bin/sh + +# This script is part of Bakefile (http://bakefile.sourceforge.net) autoconf +# script. It is used to generated precompiled headers. +# +# Permission is given to use this file in any way. + +outfile="\${1}" +header="\${2}" +shift +shift + +compiler= +headerfile= +while test \${#} -gt 0; do + case "\${1}" in + -I* ) + incdir=\`echo \${1} | sed -e 's/-I\(.*\)/\1/g'\` + if test "x\${headerfile}" = "x" -a -f "\${incdir}/\${header}" ; then + headerfile="\${incdir}/\${header}" + fi + ;; + esac + compiler="\${compiler} \${1}" + shift +done + +if test "x\${headerfile}" = "x" ; then + echo "error: can't find header \${header} in include paths" >2 +else + if test -f \${outfile} ; then + rm -f \${outfile} + else + mkdir -p \`dirname \${outfile}\` + fi + depsfile=".deps/\`basename \${outfile}\`.d" + mkdir -p .deps + # can do this because gcc is >= 3.4: + \${compiler} -o \${outfile} -MMD -MF "\${depsfile}" "\${headerfile}" + exit \${?} +fi +EOF + chmod +x bk-make-pch + fi + fi + fi + + AC_SUBST(GCC_PCH) +]) + + + dnl --------------------------------------------------------------------------- dnl AC_BAKEFILE dnl