From: Francesco M. <fr...@us...> - 2006-01-23 19:38:43
|
Update of /cvsroot/wxlua/wxLua/build/autoconf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24398/build/autoconf Modified Files: aclocal.m4 autoconf_inc.m4 configure.ac wxpresets.m4 Added Files: wxlua.pc.in Log Message: updated bakefiles Index: wxpresets.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/wxpresets.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxpresets.m4 26 Nov 2005 14:06:05 -0000 1.2 --- wxpresets.m4 23 Jan 2006 19:38:29 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- dnl --------------------------------------------------------------------------- dnl Author: Francesco Montorsi + dnl (contributions by David Hart) dnl Creation date: 13/9/2005 dnl RCS-ID: $Id$ *************** *** 53,56 **** --- 54,87 ---- dnl --------------------------------------------------------------------------- + dnl AM_SAVE_COREVAR() + dnl + dnl Saves the CPPFLAGS, CXXFLAGS, CFLAGS and LIBS variables in some helper + dnl variables which are used to restore them later (see AM_RESTORE_COREVAR) + dnl --------------------------------------------------------------------------- + AC_DEFUN([AM_SAVE_COREVAR], + [ + SAVED_CPPFLAGS="$CPPFLAGS" + SAVED_CXXFLAGS="$CXXFLAGS" + SAVED_CFLAGS="$CFLAGS" + SAVED_LIBS="$LIBS" + ]) + + + dnl --------------------------------------------------------------------------- + dnl AM_RESTORE_COREVAR() + dnl + dnl Loads into the CPPFLAGS, CXXFLAGS, CFLAGS and LIBS variables the values + dnl of the helper variables set by AM_SAVE_COREVAR + dnl --------------------------------------------------------------------------- + AC_DEFUN([AM_RESTORE_COREVAR], + [ + CPPFLAGS="$SAVED_CPPFLAGS" + CXXFLAGS="$SAVED_CXXFLAGS" + CFLAGS="$SAVED_CFLAGS" + LIBS="$SAVED_LIBS" + ]) + + + dnl --------------------------------------------------------------------------- dnl AM_WXFLAGS_CONTAIN / AM_WXSELECTEDCONFIG_CONTAIN ([RESULTVAR], [STRING]) dnl *************** *** 473,479 **** dnl --------------------------------------------------------------------------- ! dnl AM_WXPRESETS([minimum-wx-version], [addwxlibraries]) dnl dnl where "addwxlibraries" are those wxWidgets libraries (when wx is built --- 504,534 ---- + dnl --------------------------------------------------------------------------- + dnl AM_GET_GTK_FLAGS + dnl + dnl When using the wxGTK port, this macro creates a GTKPKG_FLAGS variable that + dnl contains the c flags (-I and -D flags) required to compile a program which + dnl uses directly the GTK libraries (instead using the wx layer). + dnl --------------------------------------------------------------------------- + AC_DEFUN([AM_GET_GTK_FLAGS], + [ + if test "$WX_PORT" = "gtk" ; then + dnl The commands below were taken from usenet postings by John Labenski + dnl NB Trying to do GTKPKG_FLAGS=`gtk-config --cflags` fails, you have + dnl to use an intermediate var + if test "$WX_GTKPORT_VERSION" = "1" ; then + _GTKPKG_FL="gtk-config --cflags" + GTKPKG_FLAGS=`$_GTKPKG_FL` + else + _GTKPKG_FL="pkg-config --cflags gtk+-2.0" + GTKPKG_FLAGS=`$_GTKPKG_FL` + fi + fi + ]) + + dnl --------------------------------------------------------------------------- ! dnl AM_WXPRESETS([minimum-wx-version], [addwxlibraries], [addgtkflags]) dnl dnl where "addwxlibraries" are those wxWidgets libraries (when wx is built *************** *** 482,488 **** dnl dnl Just a convenience macro for - dnl AM_OPTIONS_WXCONFIG dnl AM_PATH_WXCONFIG([minimum-wx-version], [], [], [addwxlibraries]) dnl AM_WXPRESETS_CHECK dnl macros. dnl --------------------------------------------------------------------------- --- 537,543 ---- dnl dnl Just a convenience macro for dnl AM_PATH_WXCONFIG([minimum-wx-version], [], [], [addwxlibraries]) dnl AM_WXPRESETS_CHECK + dnl AM_GET_GTK_FLAGS (only when addgtkflags != '') dnl macros. dnl --------------------------------------------------------------------------- *************** *** 527,530 **** --- 582,597 ---- dnl Synch our WX_DEBUG,WX_UNICODE,WX_SHARED variables with wx ones AM_WXPRESETS_CHECK + + dnl It doesn't matter what "gtkaddflags" parameter contains, + dnl if it's non-empty it's true + if test -n "$3" ; then + dnl Add gtk-specific flags (useful when compiling wx sources + dnl that directly use the GTK libraries) + AM_GET_GTK_FLAGS + + dnl Update global flags + CXXFLAGS="$CXXFLAGS $GTKPKG_FLAGS" + CFLAGS="$CFLAGS $GTKPKG_FLAGS" + fi ]) *************** *** 532,536 **** dnl --------------------------------------------------------------------------- ! dnl AM_WXPRESETS_FULL([minimum-wx-version], [addwxlibraries]) dnl dnl Like AM_WXPRESETS but this macro also does those standard checks --- 599,603 ---- dnl --------------------------------------------------------------------------- ! dnl AM_WXPRESETS_FULL([minimum-wx-version], [addwxlibraries], [addgtkflags]) dnl dnl Like AM_WXPRESETS but this macro also does those standard checks *************** *** 560,567 **** dnl check for wxWidgets library and initialization of WX_* variables ! AM_WXPRESETS([$1], [$2]) dnl add the optimize/debug flags - dnl FIXME: unsure if these are right also for compilers other than GCC dnl NOTE1: these checks must be put after AM_WXPRESETS (which sets the $WX_* variables)... dnl NOTE2: the CXXFLAGS are merged together with the CPPFLAGS so we don't need to set them, too --- 627,633 ---- dnl check for wxWidgets library and initialization of WX_* variables ! AM_WXPRESETS([$1], [$2], [$3]) dnl add the optimize/debug flags dnl NOTE1: these checks must be put after AM_WXPRESETS (which sets the $WX_* variables)... dnl NOTE2: the CXXFLAGS are merged together with the CPPFLAGS so we don't need to set them, too *************** *** 632,633 **** --- 698,700 ---- ]) + Index: autoconf_inc.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/autoconf_inc.m4,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** autoconf_inc.m4 25 Nov 2005 23:06:10 -0000 1.3 --- autoconf_inc.m4 23 Jan 2006 19:38:29 -0000 1.4 *************** *** 2,9 **** dnl dnl This macro was generated by ! dnl Bakefile 0.1.9 (http://bakefile.sourceforge.net) dnl Do not modify, all changes will be overwritten! ! BAKEFILE_AUTOCONF_INC_M4_VERSION="0.1.9" dnl ### begin block 20_COND_DEPS_TRACKING_0[../../apps/build/bakefiles/apps.bkl,../../modules/build/bakefiles/modules.bkl,../../util/build/bakefiles/util.bkl,./wxlua.bkl] ### --- 2,9 ---- dnl dnl This macro was generated by ! dnl Bakefile 0.2.0 (http://bakefile.sourceforge.net) dnl Do not modify, all changes will be overwritten! ! BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.0" dnl ### begin block 20_COND_DEPS_TRACKING_0[../../apps/build/bakefiles/apps.bkl,../../modules/build/bakefiles/modules.bkl,../../util/build/bakefiles/util.bkl,./wxlua.bkl] ### Index: configure.ac =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/configure.ac,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** configure.ac 26 Nov 2005 14:20:30 -0000 1.4 --- configure.ac 23 Jan 2006 19:38:29 -0000 1.5 *************** *** 58,61 **** --- 58,68 ---- + # Global wxLua options: + # we could use these to define options like --enable-all-apps or --enable-all-utils + # but these would be rather uncommon options in Unix world and thus we'll leave these + # options fixed to their default values + USE_UTIL=1 + USE_APPS=1 + AM_OPTIONS_WXCONFIG # don't touch this macro *************** *** 69,73 **** ##################################################################### ! AM_WXPRESETS_FULL([2.4.0], []) --- 76,80 ---- ##################################################################### ! AM_WXPRESETS_FULL([2.4.0], [xrc,html,media,adv,net,xml]) *************** *** 78,82 **** AC_BAKEFILE([m4_include(autoconf_inc.m4)]) ! AC_CONFIG_FILES([Makefile modules/Makefile apps/Makefile util/Makefile]) AC_OUTPUT --- 85,89 ---- AC_BAKEFILE([m4_include(autoconf_inc.m4)]) ! AC_CONFIG_FILES([Makefile modules/Makefile apps/Makefile util/Makefile build/autoconf/wxlua.pc]) AC_OUTPUT --- NEW FILE: wxlua.pc.in --- prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ # the include paths required to build something wxLua-based includepaths=${includedir} libpaths=${libdir} libs="wxlua" Name: @PACKAGE_NAME@ Description: wxWidgets lua wrappers Version: @PACKAGE_VERSION@ Libs: -L${libdir} -lwxlua Cflags: -I${includedir} # in reality, wxLua requires wxWidgets; however wxWidgets does not # uses pkg-config utility and thus we cannot list it here; # so, you'll need to use `wx-config --cxxflags` and `wx-config --libs` # commands for the additional compiler & linker flags required. Requires: Index: aclocal.m4 =================================================================== RCS file: /cvsroot/wxlua/wxLua/build/autoconf/aclocal.m4,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** aclocal.m4 26 Nov 2005 14:06:05 -0000 1.2 --- aclocal.m4 23 Jan 2006 19:38:29 -0000 1.3 *************** *** 301,305 **** [ #ifndef __INTEL_COMPILER ! #error Not icc #endif ], --- 301,305 ---- [ #ifndef __INTEL_COMPILER ! #error Not ICC #endif ], *************** *** 657,660 **** --- 657,662 ---- GCC_PCH=0 + ICC_PCH=0 + USE_PCH=0 case ${BAKEFILE_HOST} in *************** *** 681,685 **** #if (__GNUC__ == 3) && \ ((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \ ! ( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) #error "no pch support" #endif --- 683,688 ---- #if (__GNUC__ == 3) && \ ((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \ ! ( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) || \ ! ( defined(__INTEL_COMPILER) ) #error "no pch support" #endif *************** *** 690,696 **** ], [ ! AC_MSG_RESULT([no]) ]) ! if test $GCC_PCH = 1 ; then AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH chmod +x bk-make-pch --- 693,713 ---- ], [ ! AC_TRY_COMPILE([], ! [ ! #if !defined(__INTEL_COMPILER) || \ ! (__INTEL_COMPILER < 900) ! #error "no pch support" ! #endif ! ], ! [ ! AC_MSG_RESULT([yes]) ! ICC_PCH=1 ! ], ! [ ! AC_MSG_RESULT([no]) ! ]) ]) ! if test $GCC_PCH = 1 -o $ICC_PCH = 1 ; then ! USE_PCH=1 AC_BAKEFILE_CREATE_FILE_BK_MAKE_PCH chmod +x bk-make-pch *************** *** 700,703 **** --- 717,721 ---- AC_SUBST(GCC_PCH) + AC_SUBST(ICC_PCH) ]) *************** *** 730,733 **** --- 748,755 ---- if test "x$BAKEFILE_HOST" = "x"; then + if test "x${host}" = "x" ; then + AC_MSG_ERROR([You must call the autoconf "CANONICAL_HOST" macro in your configure.ac (or .in) file.]) + fi + BAKEFILE_HOST="${host}" fi *************** *** 745,749 **** AC_BAKEFILE_RES_COMPILERS ! BAKEFILE_BAKEFILE_M4_VERSION="0.1.9" dnl includes autoconf_inc.m4: --- 767,771 ---- AC_BAKEFILE_RES_COMPILERS ! BAKEFILE_BAKEFILE_M4_VERSION="0.2.0" dnl includes autoconf_inc.m4: *************** *** 1478,1484 **** shift ! compiler= ! headerfile= while test ${D}{#} -gt 0; do case "${D}{1}" in -I* ) --- 1500,1508 ---- shift ! compiler="" ! headerfile="" ! while test ${D}{#} -gt 0; do + add_to_cmdline=1 case "${D}{1}" in -I* ) *************** *** 1488,1498 **** fi ;; esac ! compiler="${D}{compiler} ${D}{1}" shift done if test "x${D}{headerfile}" = "x" ; then ! echo "error: can't find header ${D}{header} in include paths" >2 else if test -f ${D}{outfile} ; then --- 1512,1528 ---- fi ;; + -use-pch ) + shift + add_to_cmdline=0 + ;; esac ! if test ${D}add_to_cmdline = 1 ; then ! compiler="${D}{compiler} ${D}{1}" ! fi shift done if test "x${D}{headerfile}" = "x" ; then ! echo "error: can't find header ${D}{header} in include paths" >&2 else if test -f ${D}{outfile} ; then *************** *** 1503,1508 **** depsfile=".deps/\`echo ${D}{outfile} | tr '/.' '__'\`.d" mkdir -p .deps ! # can do this because gcc is >= 3.4: ! ${D}{compiler} -o ${D}{outfile} -MMD -MF "${D}{depsfile}" "${D}{headerfile}" exit ${D}{?} fi --- 1533,1551 ---- depsfile=".deps/\`echo ${D}{outfile} | tr '/.' '__'\`.d" mkdir -p .deps ! if test "x${GCC_PCH}" = "x1" ; then ! # can do this because gcc is >= 3.4: ! ${D}{compiler} -o ${D}{outfile} -MMD -MF "${D}{depsfile}" "${D}{headerfile}" ! elif test "x${ICC_PCH}" = "x1" ; then ! filename=pch_gen-${D}${D} ! file=${D}{filename}.c ! dfile=${D}{filename}.d ! cat > ${D}file <<EOT ! #include "${D}header" ! EOT ! # using -MF icc complains about differing command lines in creation/use ! ${D}compiler -c -create-pch ${D}outfile -MMD ${D}file && \\ ! sed -e "s,^.*:,${D}outfile:," -e "s, ${D}file,," < ${D}dfile > ${D}depsfile && \\ ! rm -f ${D}file ${D}dfile ${D}{filename}.o ! fi exit ${D}{?} fi |