From: Francesco M. <fr...@us...> - 2006-12-11 00:08:51
|
Update of /cvsroot/wxlua/wxLua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7346 Modified Files: configure Log Message: Added PCH support; now output folder for binaries are configuration-dependent to avoid problems when building wxLua with different settings Index: configure =================================================================== RCS file: /cvsroot/wxlua/wxLua/configure,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** configure 10 Dec 2006 00:47:20 -0000 1.41 --- configure 11 Dec 2006 00:08:17 -0000 1.42 *************** *** 733,736 **** --- 733,739 ---- REZ SETFILE + GCC_PCH + ICC_PCH + BK_MAKE_PCH COND_BUILD_DEBUG COND_BUILD_DEBUG_UNICODE_0 *************** *** 740,743 **** --- 743,748 ---- COND_DEPS_TRACKING_0 COND_DEPS_TRACKING_1 + COND_GCC_PCH_1 + COND_ICC_PCH_1 COND_INSTALL_CUSTOM_WXBIND_1 COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1 *************** *** 761,764 **** --- 766,770 ---- COND_USE_APPS_1 COND_USE_BIN2C_1 + COND_USE_PCH_1 COND_USE_SOSYMLINKS_1 COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1 *************** *** 1389,1392 **** --- 1395,1400 ---- don't use dependency tracking even if the compiler can + --disable-precomp-headers + don't use precompiled headers even if compiler can Optional Packages: *************** *** 9330,9333 **** --- 9338,9589 ---- BAKEFILE_AUTOCONF_INC_M4_VERSION="0.2.2" + + + # Check whether --enable-precomp-headers was given. + if test "${enable_precomp_headers+set}" = set; then + enableval=$enable_precomp_headers; bk_use_pch="$enableval" + fi + + + GCC_PCH=0 + ICC_PCH=0 + USE_PCH=0 + BK_MAKE_PCH="" + + case ${BAKEFILE_HOST} in + *-*-cygwin* ) + 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 + { echo "$as_me:$LINENO: checking if the compiler supports precompiled headers" >&5 + echo $ECHO_N "checking if the compiler supports precompiled headers... $ECHO_C" >&6; } + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + int + main () + { + + #if !defined(__GNUC__) || !defined(__GNUC_MINOR__) + There is no PCH support + #endif + #if (__GNUC__ < 3) + There is no PCH support + #endif + #if (__GNUC__ == 3) && \ + ((!defined(__APPLE_CC__) && (__GNUC_MINOR__ < 4)) || \ + ( defined(__APPLE_CC__) && (__GNUC_MINOR__ < 3))) || \ + ( defined(__INTEL_COMPILER) ) + There is no PCH support + #endif + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + GCC_PCH=1 + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ + _ACEOF + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ + + int + main () + { + + #if !defined(__INTEL_COMPILER) || \ + (__INTEL_COMPILER < 800) + There is no PCH support + #endif + + ; + return 0; + } + _ACEOF + rm -f conftest.$ac_objext + if { (ac_try="$ac_compile" + case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; + esac + eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { echo "$as_me:$LINENO: result: yes" >&5 + echo "${ECHO_T}yes" >&6; } + ICC_PCH=1 + + else + echo "$as_me: failed program was:" >&5 + sed 's/^/| /' conftest.$ac_ext >&5 + + + { echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6; } + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + fi + + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $GCC_PCH = 1 -o $ICC_PCH = 1 ; then + USE_PCH=1 + + D='$' + cat <<EOF >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="${D}{1}" + header="${D}{2}" + shift + shift + + compiler="" + headerfile="" + + while test ${D}{#} -gt 0; do + add_to_cmdline=1 + case "${D}{1}" in + -I* ) + incdir=\`echo ${D}{1} | sed -e 's/-I\\(.*\\)/\\1/g'\` + if test "x${D}{headerfile}" = "x" -a -f "${D}{incdir}/${D}{header}" ; then + headerfile="${D}{incdir}/${D}{header}" + fi + ;; + -use-pch|-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 + rm -f ${D}{outfile} + else + mkdir -p \`dirname ${D}{outfile}\` + fi + 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 + EOF + + chmod +x bk-make-pch + BK_MAKE_PCH="`pwd`/bk-make-pch" + fi + fi + fi + + + + + COND_BUILD_DEBUG="#" if test "x$BUILD" = "xdebug" ; then *************** *** 9365,9368 **** --- 9621,9634 ---- fi + COND_GCC_PCH_1="#" + if test "x$GCC_PCH" = "x1" ; then + COND_GCC_PCH_1="" + fi + + COND_ICC_PCH_1="#" + if test "x$ICC_PCH" = "x1" ; then + COND_ICC_PCH_1="" + fi + COND_INSTALL_CUSTOM_WXBIND_1="#" if test "x$INSTALL_CUSTOM_WXBIND" = "x1" ; then *************** *** 9470,9473 **** --- 9736,9744 ---- fi + COND_USE_PCH_1="#" + if test "x$USE_PCH" = "x1" ; then + COND_USE_PCH_1="" + fi + COND_USE_SOSYMLINKS_1="#" if test "x$USE_SOSYMLINKS" = "x1" ; then *************** *** 9601,9690 **** fi - # Create the output folders in the current build directory - # (this handles cases like: - # mkdir mybuild && cd mybuild && ../configure && make ) - { as_dir=lib - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || - $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || - echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 - echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - { as_dir=bin - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || - $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || - echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 - echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure --- 9872,9875 ---- *************** *** 10480,10483 **** --- 10665,10671 ---- REZ!$REZ$ac_delim SETFILE!$SETFILE$ac_delim + GCC_PCH!$GCC_PCH$ac_delim + ICC_PCH!$ICC_PCH$ac_delim + BK_MAKE_PCH!$BK_MAKE_PCH$ac_delim COND_BUILD_DEBUG!$COND_BUILD_DEBUG$ac_delim COND_BUILD_DEBUG_UNICODE_0!$COND_BUILD_DEBUG_UNICODE_0$ac_delim *************** *** 10487,10490 **** --- 10675,10680 ---- COND_DEPS_TRACKING_0!$COND_DEPS_TRACKING_0$ac_delim COND_DEPS_TRACKING_1!$COND_DEPS_TRACKING_1$ac_delim + COND_GCC_PCH_1!$COND_GCC_PCH_1$ac_delim + COND_ICC_PCH_1!$COND_ICC_PCH_1$ac_delim COND_INSTALL_CUSTOM_WXBIND_1!$COND_INSTALL_CUSTOM_WXBIND_1$ac_delim COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1!$COND_PLATFORM_MACOSX_0_USE_SOVERCYGWIN_0_USE_SOVERSION_1$ac_delim *************** *** 10508,10511 **** --- 10698,10702 ---- COND_USE_APPS_1!$COND_USE_APPS_1$ac_delim COND_USE_BIN2C_1!$COND_USE_BIN2C_1$ac_delim + COND_USE_PCH_1!$COND_USE_PCH_1$ac_delim COND_USE_SOSYMLINKS_1!$COND_USE_SOSYMLINKS_1$ac_delim COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1!$COND_USE_SOVERCYGWIN_1_USE_SOVERSION_1$ac_delim *************** *** 10532,10536 **** _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 86; then break elif $ac_last_try; then --- 10723,10727 ---- _ACEOF ! if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then break elif $ac_last_try; then |