From 81a33fde563f125c44578b78b80a5545d95085db Mon Sep 17 00:00:00 2001 From: helge Date: Fri, 26 Aug 2005 17:02:53 +0000 Subject: [PATCH] added --enable-pch to configure git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1084 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- gnustep-make/ChangeLog | 2 + gnustep-make/configure | 101 +++++++++++++++++++++++++------------- gnustep-make/configure.ac | 31 +++++++++--- 3 files changed, 93 insertions(+), 41 deletions(-) diff --git a/gnustep-make/ChangeLog b/gnustep-make/ChangeLog index 5f350c14..f500e157 100644 --- a/gnustep-make/ChangeLog +++ b/gnustep-make/ChangeLog @@ -1,5 +1,7 @@ 2005-08-26 Helge Hess + * configure.ac: replaced gcc-version check with a --enable-pch option + * Master/*.make: delete derived sources directory during clean in relevant project files diff --git a/gnustep-make/configure b/gnustep-make/configure index 7089db63..dc235727 100755 --- a/gnustep-make/configure +++ b/gnustep-make/configure @@ -862,6 +862,7 @@ Optional Features: use native objective-c exceptions --enable-strip-makefiles Enable stripping makefiles after installation --disable-move-obsolete Disable moving obsolete dir structure +--enable-pch Enable precompiled headers Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -990,7 +991,7 @@ esac else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi - cd "$ac_popdir" + cd $ac_popdir done fi @@ -1914,7 +1915,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -1972,7 +1974,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2088,7 +2091,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2142,7 +2146,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2187,7 +2192,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -2231,7 +2237,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3504,7 +3511,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3576,7 +3584,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3630,7 +3639,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3701,7 +3711,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3755,7 +3766,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -3838,7 +3850,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4008,7 +4021,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4086,7 +4100,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4274,7 +4289,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -4813,8 +4829,8 @@ CFLAGS="$saved_CFLAGS" # Check if compiler supports -MMD -MP to generate %.d files ... #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking if the compiler supports autodependencies/pch" >&5 -echo $ECHO_N "checking if the compiler supports autodependencies/pch... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking if the compiler supports autodependencies" >&5 +echo $ECHO_N "checking if the compiler supports autodependencies... $ECHO_C" >&6 # What we want to do: set AUTO_DEPENDENCIES to yes if gcc => 3.x @@ -4837,15 +4853,8 @@ else if test "${gs_cv_gcc_major_version}" -ge "3" ; then AUTO_DEPENDENCIES=yes - if test "${gs_cv_gcc_major_version}" -ge "4" ; then - PRECOMPILED_HEADERS=yes - echo "$as_me:$LINENO: result: yes/yes: gcc major version is ${gs_cv_gcc_major_version}" >&5 -echo "${ECHO_T}yes/yes: gcc major version is ${gs_cv_gcc_major_version}" >&6 - else - PRECOMPILED_HEADERS="" - echo "$as_me:$LINENO: result: yes/no: gcc major version is ${gs_cv_gcc_major_version}" >&5 -echo "${ECHO_T}yes/no: gcc major version is ${gs_cv_gcc_major_version}" >&6 - fi + echo "$as_me:$LINENO: result: yes: gcc major version is ${gs_cv_gcc_major_version}" >&5 +echo "${ECHO_T}yes: gcc major version is ${gs_cv_gcc_major_version}" >&6 else AUTO_DEPENDENCIES="" PRECOMPILED_HEADERS="" @@ -4911,6 +4920,33 @@ echo "$as_me: Old GNUstep directories will not be moved" >&6;} fi +#-------------------------------------------------------------------- +# Enable/disable precompiled headers +#-------------------------------------------------------------------- +# TODO: replace with / add a check whether PCH works with the +# compiler +gs_enable_pch=no +echo "$as_me:$LINENO: checking if we should enable precompiled headers (pch)" >&5 +echo $ECHO_N "checking if we should enable precompiled headers (pch)... $ECHO_C" >&6 +# Check whether --enable-pch or --disable-pch was given. +if test "${enable_pch+set}" = set; then + enableval="$enable_pch" + gs_enable_pch=$enableval +else + gs_enable_pch=no +fi; + +if test "$gs_enable_pch" = "yes"; then + PRECOMPILED_HEADERS=yes + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; +else + PRECOMPILED_HEADERS= + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; +fi + + #-------------------------------------------------------------------- # Record the version #-------------------------------------------------------------------- @@ -5811,6 +5847,11 @@ esac *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ @@ -5849,12 +5890,6 @@ echo "$as_me: error: cannot find input file: $f" >&2;} fi;; esac done` || { (exit 1); exit 1; } - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub diff --git a/gnustep-make/configure.ac b/gnustep-make/configure.ac index 5c59fc23..28da5ad3 100644 --- a/gnustep-make/configure.ac +++ b/gnustep-make/configure.ac @@ -565,7 +565,7 @@ CFLAGS="$saved_CFLAGS" # Check if compiler supports -MMD -MP to generate %.d files ... #-------------------------------------------------------------------- -AC_MSG_CHECKING(if the compiler supports autodependencies/pch) +AC_MSG_CHECKING(if the compiler supports autodependencies) # What we want to do: set AUTO_DEPENDENCIES to yes if gcc => 3.x @@ -587,13 +587,7 @@ else if test "${gs_cv_gcc_major_version}" -ge "3" ; then AUTO_DEPENDENCIES=yes - if test "${gs_cv_gcc_major_version}" -ge "4" ; then - PRECOMPILED_HEADERS=yes - AC_MSG_RESULT(yes/yes: gcc major version is ${gs_cv_gcc_major_version}) - else - PRECOMPILED_HEADERS="" - AC_MSG_RESULT(yes/no: gcc major version is ${gs_cv_gcc_major_version}) - fi + AC_MSG_RESULT(yes: gcc major version is ${gs_cv_gcc_major_version}) else AUTO_DEPENDENCIES="" PRECOMPILED_HEADERS="" @@ -648,6 +642,27 @@ else fi AC_SUBST(GNUSTEP_MOVE_OBSOLETE) +#-------------------------------------------------------------------- +# Enable/disable precompiled headers +#-------------------------------------------------------------------- +# TODO: replace with / add a check whether PCH works with the +# compiler +gs_enable_pch=no +AC_MSG_CHECKING(if we should enable precompiled headers (pch)) +AC_ARG_ENABLE(pch, +[--enable-pch Enable precompiled headers], + gs_enable_pch=$enableval, + gs_enable_pch=no) + +if test "$gs_enable_pch" = "yes"; then + PRECOMPILED_HEADERS=yes + AC_MSG_RESULT(yes); +else + PRECOMPILED_HEADERS= + AC_MSG_RESULT(no); +fi +AC_SUBST(PRECOMPILED_HEADERS) + #-------------------------------------------------------------------- # Record the version #-------------------------------------------------------------------- -- 2.39.5