From: Francesco M. <fr...@us...> - 2005-11-26 14:06:18
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13105/build/autoconf Modified Files: aclocal.m4 acregen.sh configure.ac wxpresets.m4 Log Message: added configure checks for wxLua apps,modules,util options Index: wxpresets.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/wxpresets.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxpresets.m4 20 Nov 2005 11:36:23 -0000 1.1 --- wxpresets.m4 26 Nov 2005 14:06:05 -0000 1.2 *************** *** 16,20 **** dnl dnl # required library checks ! dnl AM_WXPRESETS dnl ... dnl --- 16,20 ---- dnl dnl # required library checks ! dnl AM_WXPRESETS_FULL([2.6.1], [net,xrc,stc]) dnl ... dnl *************** *** 31,34 **** --- 31,56 ---- dnl --------------------------------------------------------------------------- + dnl AM_YESNO_OPTCHECK([name of the boolean variable to set], + dnl [name of the --enable-option variable with yes/no values], + dnl [name of the --enable option]) + dnl + dnl Converts the $3 variable, suppose to contain a yes/no value to a 1/0 + dnl boolean variable and saves the result into $1. + dnl Outputs also the standard checking-option message. + dnl --------------------------------------------------------------------------- + AC_DEFUN([AM_YESNO_OPTCHECK], + [ + AC_MSG_CHECKING([for $3 option]) + if [[ "x$$2" = "xyes" ]]; then + AC_MSG_RESULT([yes]) + $1=1 + else + AC_MSG_RESULT([no]) + $1=0 + fi + ]) + + + dnl --------------------------------------------------------------------------- dnl AM_WXFLAGS_CONTAIN / AM_WXSELECTEDCONFIG_CONTAIN ([RESULTVAR], [STRING]) dnl *************** *** 547,554 **** dnl NOTE: the -Wundef and -Wno-ctor-dtor-privacy are not enabled automatically by -Wall ! CPPFLAGS="$CPPFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy" CFLAGS="$CFLAGS -g -O0 -Wall -Wundef" else ! CPPFLAGS="$CPPFLAGS -O2" CFLAGS="$CFLAGS -O2" fi --- 569,580 ---- dnl NOTE: the -Wundef and -Wno-ctor-dtor-privacy are not enabled automatically by -Wall ! dnl NOTE2: the '-Wno-ctor-dtor-privacy' has sense only when compiling C++ source files ! dnl and thus we must be careful to add it only to CXXFLAGS and not to CFLAGS ! dnl (remember that CPPFLAGS is reserved for both C and C++ compilers while ! dnl CFLAGS is intended as flags for C compiler only and CXXFLAGS for C++ only) ! CXXFLAGS="$CXXFLAGS -g -O0 -Wall -Wundef -Wno-ctor-dtor-privacy" CFLAGS="$CFLAGS -g -O0 -Wall -Wundef" else ! CXXFLAGS="$CXXFLAGS -O2" CFLAGS="$CFLAGS -O2" fi Index: acregen.sh =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/acregen.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** acregen.sh 20 Nov 2005 11:35:17 -0000 1.1 --- acregen.sh 26 Nov 2005 14:06:05 -0000 1.2 *************** *** 5,10 **** # Creation date: 14/9/2005 # ! # A simple script to generate the configure script ! ( aclocal && autoconf && mv configure ../.. ) --- 5,47 ---- # Creation date: 14/9/2005 # ! # A simple script to generate the configure script for a wxCode component ! # Some features of this version: ! # - automatic test for aclocal version ! # - able to be called from any folder ! # (i.e. you can call it typing 'build/acregen.sh', not only './acregen.sh') ! # called when an old version of aclocal is found ! function aclocalold() ! { ! echo "Your aclocal version is $aclocal_maj.$aclocal_min.$aclocal_rel" ! echo "Your automake installation is too old; please install automake >= $aclocal_minimal_maj.$aclocal_minimal_min.$aclocal_minimal_rel" ! echo "You can download automake from ftp://sources.redhat.com/pub/automake/" ! exit 1 ! } ! ! # first check if we have an ACLOCAL version recent enough ! aclocal_verfull=$(aclocal --version) ! aclocal_maj=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\1/'` ! aclocal_min=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\2/'` ! aclocal_rel=`echo $aclocal_verfull | sed 's/aclocal (GNU automake) \([0-9]*\).\([0-9]*\).\([0-9]*\).*/\3/'` ! ! aclocal_minimal_maj=1 ! aclocal_minimal_min=9 ! aclocal_minimal_rel=6 ! ! majok=$(expr $aclocal_maj \>= $aclocal_minimal_maj) ! minok=$(expr $aclocal_min \>= $aclocal_minimal_min) ! relok=$(expr $aclocal_rel \>= $aclocal_minimal_rel) ! ! if [[ "$majok" = "0" ]]; then aclocalold; fi ! if [[ "$majok" = "1" && "$minok" = "0" ]]; then aclocalold; fi ! if [[ "$majok" = "1" && "$minok" = "1" && "$relok" = 0 ]]; then aclocalold; fi ! ! # we can safely proceed ! me=$(basename $0) ! path=${0%%/$me} # path from which the script has been launched ! current=$(pwd) ! cd $path ! aclocal && autoconf && mv configure ../.. ! cd $current Index: configure.ac =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/configure.ac,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** configure.ac 20 Nov 2005 12:11:48 -0000 1.2 --- configure.ac 26 Nov 2005 14:06:05 -0000 1.3 *************** *** 18,24 **** --- 18,62 ---- + ## CONFIGURE OPTIONS ##################################################################### + # Options for the APPS section + + AC_ARG_ENABLE([wxlua-app], + [AC_HELP_STRING([--enable-wxlua-app], [Compiles the wxLua app (default is yes)])], + [], [enable_wxlua_app=yes]) + AC_ARG_ENABLE([wxluaedit-app], + [AC_HELP_STRING([--enable-wxluaedit-app], [Compiles the wxLuaEditor app (default is no)])], + [], [enable_wxluaedit_app=no]) + + + # Options for the MODULES section + + AC_ARG_ENABLE([wxluadebuglib], + [AC_HELP_STRING([--enable-wxluadebuglib], [Compiles the wxLua debug support (default is yes)])], + [], [enable_wxluadebuglib=yes]) + AC_ARG_ENABLE([wxluasocketlib], + [AC_HELP_STRING([--enable-wxluasocketlib], [Compiles the wxLua socket support (default is yes)])], + [], [enable_wxluasocketlib=yes]) + + + # Options for the UTIL section + + AC_ARG_ENABLE([bin2c], + [AC_HELP_STRING([--enable-bin2c], [Compiles the bin2c utility (default is yes)])], + [], [enable_bin2c=yes]) + + + AM_YESNO_OPTCHECK([USE_WXLUAAPP], [enable_wxlua_app], [--enable-wxlua-app]) + AM_YESNO_OPTCHECK([USE_WXLUAEDITAPP], [enable_wxluaedit_app], [--enable-wxluaedit-app]) + + AM_YESNO_OPTCHECK([USE_WXLUADEBUGLIB], [enable_wxluadebuglib], [--enable-wxluadebuglib]) + AM_YESNO_OPTCHECK([USE_WXLUASOCKETLIB], [enable_wxluasocketlib], [--enable-wxluasocketlib]) + + AM_YESNO_OPTCHECK([USE_BIN2C], [enable_bin2c], [--enable-bin2c]) + + + AM_OPTIONS_WXCONFIG # don't touch this macro AM_OPTIONS_WXPRESETS # don't touch this macro Index: aclocal.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/aclocal.m4,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** aclocal.m4 20 Nov 2005 11:36:23 -0000 1.1 --- aclocal.m4 26 Nov 2005 14:06:05 -0000 1.2 *************** *** 323,326 **** --- 323,332 ---- *-*-darwin* ) + AC_BAKEFILE_CREATE_FILE_SHARED_LD_SH + chmod +x shared-ld-sh + + SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -o" + SHARED_LD_MODULE_CXX="$SHARED_LD_MODULE_CC" + dnl Most apps benefit from being fully binded (its faster and static dnl variables initialized at startup work). *************** *** 330,334 **** 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], bakefile_cv_gcc31, [ --- 336,340 ---- dnl If using newer dev tools then there is a -single_module flag that ! dnl we can use to do this for dylibs, 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], bakefile_cv_gcc31, [ *************** *** 349,366 **** ]) if test "$bakefile_cv_gcc31" = "no"; then - AC_BAKEFILE_CREATE_FILE_SHARED_LD_SH - chmod +x shared-ld-sh - dnl Use the shared-ld-sh helper script SHARED_LD_CC="`pwd`/shared-ld-sh -dynamiclib -headerpad_max_install_names -o" - SHARED_LD_MODULE_CC="`pwd`/shared-ld-sh -bundle -headerpad_max_install_names -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 -headerpad_max_install_names -o" - SHARED_LD_MODULE_CC="\${CC} -bundle -single_module -headerpad_max_install_names -o" SHARED_LD_CXX="\${CXX} -dynamiclib -single_module -headerpad_max_install_names -o" - SHARED_LD_MODULE_CXX="\${CXX} -bundle -single_module -headerpad_max_install_names -o" fi --- 355,365 ---- *************** *** 375,401 **** *-*-aix* ) if test "x$GCC" = "xyes"; then ! dnl at least gcc 2.95 warns that -fPIC is ignored when ! dnl compiling each and every file under AIX which is annoying, ! dnl so don't use it there (it's useless as AIX runs on ! dnl position-independent architectures only anyhow) ! PIC_FLAG="" ! dnl -bexpfull is needed by AIX linker to export all symbols (by ! dnl default it doesn't export any and even with -bexpall it ! dnl doesn't export all C++ support symbols, e.g. vtable ! dnl pointers) but it's only available starting from 5.1 (with ! dnl maintenance pack 2, whatever this is), see ! dnl http://www-128.ibm.com/developerworks/eserver/articles/gnu.html ! case "${BAKEFILE_HOST}" in ! *-*-aix5* ) ! LD_EXPFULL="-Wl,-bexpfull" ! ;; ! esac ! SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o" ! SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o" ! else ! dnl FIXME: makeC++SharedLib is obsolete, what should we do for ! dnl recent AIX versions? AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib, makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib) --- 374,400 ---- *-*-aix* ) if test "x$GCC" = "xyes"; then ! dnl at least gcc 2.95 warns that -fPIC is ignored when ! dnl compiling each and every file under AIX which is annoying, ! dnl so don't use it there (it's useless as AIX runs on ! dnl position-independent architectures only anyhow) ! PIC_FLAG="" ! dnl -bexpfull is needed by AIX linker to export all symbols (by ! dnl default it doesn't export any and even with -bexpall it ! dnl doesn't export all C++ support symbols, e.g. vtable ! dnl pointers) but it's only available starting from 5.1 (with ! dnl maintenance pack 2, whatever this is), see ! dnl http://www-128.ibm.com/developerworks/eserver/articles/gnu.html ! case "${BAKEFILE_HOST}" in ! *-*-aix5* ) ! LD_EXPFULL="-Wl,-bexpfull" ! ;; ! esac ! SHARED_LD_CC="\$(CC) -shared $LD_EXPFULL -o" ! SHARED_LD_CXX="\$(CXX) -shared $LD_EXPFULL -o" ! else ! dnl FIXME: makeC++SharedLib is obsolete, what should we do for ! dnl recent AIX versions? AC_CHECK_PROG(AIX_CXX_LD, makeC++SharedLib, makeC++SharedLib, /usr/lpp/xlC/bin/makeC++SharedLib) *************** *** 418,422 **** fi ;; ! *-*-cygwin* | *-*-mingw32* ) PIC_FLAG="" --- 417,421 ---- fi ;; ! *-*-cygwin* | *-*-mingw32* ) PIC_FLAG="" *************** *** 433,437 **** chmod +x dllar.sh ;; ! powerpc-apple-macos* | \ *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \ --- 432,436 ---- chmod +x dllar.sh ;; ! powerpc-apple-macos* | \ *-*-freebsd* | *-*-openbsd* | *-*-netbsd* | *-*-k*bsd*-gnu | \ *************** *** 626,649 **** AC_DEFUN([AC_BAKEFILE_RES_COMPILERS], [ - RESCOMP= - SETFILE= - case ${BAKEFILE_HOST} in *-*-cygwin* | *-*-mingw32* ) dnl Check for win32 resources compiler: ! if test "$build" != "$host" ; then ! RESCOMP=$host_alias-windres ! else ! AC_CHECK_PROG(RESCOMP, windres, windres, windres) ! fi ;; *-*-darwin* | powerpc-apple-macos* ) ! AC_CHECK_PROG(RESCOMP, Rez, Rez, /Developer/Tools/Rez) AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile) ;; esac ! AC_SUBST(RESCOMP) AC_SUBST(SETFILE) ]) --- 625,642 ---- AC_DEFUN([AC_BAKEFILE_RES_COMPILERS], [ case ${BAKEFILE_HOST} in *-*-cygwin* | *-*-mingw32* ) dnl Check for win32 resources compiler: ! AC_CHECK_TOOL(WINDRES, windres) ;; *-*-darwin* | powerpc-apple-macos* ) ! AC_CHECK_PROG(REZ, Rez, Rez, /Developer/Tools/Rez) AC_CHECK_PROG(SETFILE, SetFile, SetFile, /Developer/Tools/SetFile) ;; esac ! AC_SUBST(WINDRES) ! AC_SUBST(REZ) AC_SUBST(SETFILE) ]) *************** *** 665,668 **** --- 658,670 ---- GCC_PCH=0 + case ${BAKEFILE_HOST} in + *-*-cygwin* ) + dnl PCH support is broken in cygwin gcc because of unportable + dnl assumptions about mmap() in gcc code which make PCH generation + dnl fail erratically; disable PCH completely until this is fixed + bk_use_pch="no" + ;; + esac + if test "x$bk_use_pch" = "x" -o "x$bk_use_pch" = "xyes" ; then if test "x$GCC" = "xyes"; then |