added --without-subdirs option to speed up configure when you only need to build the main library

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-10-03 18:19:10 +00:00
parent 14ba002a91
commit 1c14217db4
3 changed files with 72 additions and 23 deletions

View File

@@ -335,10 +335,11 @@ AC_DEFUN([WX_ARG_SYS_WITH],
]) ])
dnl this macro checks for a command line argument and caches the result dnl this macro checks for a command line argument and caches the result
dnl usage: WX_ARG_WITH(option, helpmessage, variable-name) dnl usage: WX_ARG_WITH(option, helpmessage, variable-name, [withstring])
AC_DEFUN([WX_ARG_WITH], AC_DEFUN([WX_ARG_WITH],
[ [
AC_MSG_CHECKING([for --with-$1]) withstring=$4
AC_MSG_CHECKING([for --${withstring:-with}-$1])
no_cache=0 no_cache=0
AC_ARG_WITH($1, [$2], AC_ARG_WITH($1, [$2],
[ [

85
configure vendored
View File

@@ -1054,6 +1054,7 @@ Optional Features:
Optional Packages: Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--without-subdirs don't generate makefiles for samples/demos/...
--with-gtk[=VERSION] use GTK+, VERSION can be 2 (default), 1 or "any" --with-gtk[=VERSION] use GTK+, VERSION can be 2 (default), 1 or "any"
--with-motif use Motif/Lesstif --with-motif use Motif/Lesstif
--with-mac use Mac OS X --with-mac use Mac OS X
@@ -2565,6 +2566,48 @@ echo "${ECHO_T}no" >&6
fi fi
withstring=without
echo "$as_me:$LINENO: checking for --${withstring:-with}-subdirs" >&5
echo $ECHO_N "checking for --${withstring:-with}-subdirs... $ECHO_C" >&6
no_cache=0
# Check whether --with-subdirs or --without-subdirs was given.
if test "${with_subdirs+set}" = set; then
withval="$with_subdirs"
if test "$withval" = yes; then
ac_cv_use_subdirs='wxWITH_SUBDIRS=yes'
else
ac_cv_use_subdirs='wxWITH_SUBDIRS=no'
fi
else
LINE=`grep "wxWITH_SUBDIRS" ${wx_arg_cache_file}`
if test "x$LINE" != x ; then
eval "DEFAULT_$LINE"
else
no_cache=1
fi
ac_cv_use_subdirs='wxWITH_SUBDIRS='$DEFAULT_wxWITH_SUBDIRS
fi;
eval "$ac_cv_use_subdirs"
if test "$no_cache" != 1; then
echo $ac_cv_use_subdirs >> ${wx_arg_cache_file}.tmp
fi
if test "$wxWITH_SUBDIRS" = yes; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_GUI" = "yes"; then
@@ -2994,8 +3037,9 @@ echo "$as_me: error: Invalid value for --with-libxpm: should be yes, no, sys, or
fi fi
echo "$as_me:$LINENO: checking for --with-libmspack" >&5 withstring=
echo $ECHO_N "checking for --with-libmspack... $ECHO_C" >&6 echo "$as_me:$LINENO: checking for --${withstring:-with}-libmspack" >&5
echo $ECHO_N "checking for --${withstring:-with}-libmspack... $ECHO_C" >&6
no_cache=0 no_cache=0
# Check whether --with-libmspack or --without-libmspack was given. # Check whether --with-libmspack or --without-libmspack was given.
@@ -3035,8 +3079,9 @@ echo "${ECHO_T}no" >&6
fi fi
echo "$as_me:$LINENO: checking for --with-sdl" >&5 withstring=
echo $ECHO_N "checking for --with-sdl... $ECHO_C" >&6 echo "$as_me:$LINENO: checking for --${withstring:-with}-sdl" >&5
echo $ECHO_N "checking for --${withstring:-with}-sdl... $ECHO_C" >&6
no_cache=0 no_cache=0
# Check whether --with-sdl or --without-sdl was given. # Check whether --with-sdl or --without-sdl was given.
@@ -3076,8 +3121,9 @@ echo "${ECHO_T}no" >&6
fi fi
echo "$as_me:$LINENO: checking for --with-gnomeprint" >&5 withstring=
echo $ECHO_N "checking for --with-gnomeprint... $ECHO_C" >&6 echo "$as_me:$LINENO: checking for --${withstring:-with}-gnomeprint" >&5
echo $ECHO_N "checking for --${withstring:-with}-gnomeprint... $ECHO_C" >&6
no_cache=0 no_cache=0
# Check whether --with-gnomeprint or --without-gnomeprint was given. # Check whether --with-gnomeprint or --without-gnomeprint was given.
@@ -3117,8 +3163,9 @@ echo "${ECHO_T}no" >&6
fi fi
echo "$as_me:$LINENO: checking for --with-opengl" >&5 withstring=
echo $ECHO_N "checking for --with-opengl... $ECHO_C" >&6 echo "$as_me:$LINENO: checking for --${withstring:-with}-opengl" >&5
echo $ECHO_N "checking for --${withstring:-with}-opengl... $ECHO_C" >&6
no_cache=0 no_cache=0
# Check whether --with-opengl or --without-opengl was given. # Check whether --with-opengl or --without-opengl was given.
@@ -3161,8 +3208,9 @@ echo "${ECHO_T}no" >&6
fi fi
echo "$as_me:$LINENO: checking for --with-dmalloc" >&5 withstring=
echo $ECHO_N "checking for --with-dmalloc... $ECHO_C" >&6 echo "$as_me:$LINENO: checking for --${withstring:-with}-dmalloc" >&5
echo $ECHO_N "checking for --${withstring:-with}-dmalloc... $ECHO_C" >&6
no_cache=0 no_cache=0
# Check whether --with-dmalloc or --without-dmalloc was given. # Check whether --with-dmalloc or --without-dmalloc was given.
@@ -11316,7 +11364,7 @@ echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes` GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set} ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS ac_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -g" CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then if test "${ac_cv_prog_cc_g+set}" = set; then
@@ -11787,7 +11835,7 @@ fi
unset ac_cv_prog_cc_g unset ac_cv_prog_cc_g
ac_test_CFLAGS=${CFLAGS+set} ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS ac_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -g" CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then if test "${ac_cv_prog_cc_g+set}" = set; then
@@ -12706,9 +12754,9 @@ if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then if test "$GXX" = yes; then
CXXFLAGS="$CXXFLAGS -g -O2" CXXFLAGS="-g -O2"
else else
CXXFLAGS="$CXXFLAGS -g" CXXFLAGS="-g"
fi fi
else else
if test "$GXX" = yes; then if test "$GXX" = yes; then
@@ -13027,9 +13075,9 @@ if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS=$ac_save_CXXFLAGS CXXFLAGS=$ac_save_CXXFLAGS
elif test $ac_cv_prog_cxx_g = yes; then elif test $ac_cv_prog_cxx_g = yes; then
if test "$GXX" = yes; then if test "$GXX" = yes; then
CXXFLAGS="$CXXFLAGS -g -O2" CXXFLAGS="-g -O2"
else else
CXXFLAGS="$CXXFLAGS -g" CXXFLAGS="-g"
fi fi
else else
if test "$GXX" = yes; then if test "$GXX" = yes; then
@@ -45777,7 +45825,7 @@ fi
if test "$wxWITH_SUBDIRS" != "no"; then
if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_GUI" = "yes"; then
SUBDIRS="samples demos utils contrib" SUBDIRS="samples demos utils contrib"
else SUBDIRS="samples utils" else SUBDIRS="samples utils"
@@ -45948,8 +45996,7 @@ for subdir in `echo $SUBDIRS`; do
done done
fi fi
done done
fi
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure # tests run on this system so they can be shared between configure

View File

@@ -781,6 +781,7 @@ dnl ---------------------------------------------------------------------------
WX_ARG_ENABLE(gui, [ --enable-gui use GUI classes], wxUSE_GUI) WX_ARG_ENABLE(gui, [ --enable-gui use GUI classes], wxUSE_GUI)
WX_ARG_ENABLE(monolithic, [ --enable-monolithic build wxWidgets as single library], wxUSE_MONOLITHIC) WX_ARG_ENABLE(monolithic, [ --enable-monolithic build wxWidgets as single library], wxUSE_MONOLITHIC)
WX_ARG_ENABLE(plugins, [ --enable-plugins build parts of wxWidgets as loadable components], wxUSE_PLUGINS) WX_ARG_ENABLE(plugins, [ --enable-plugins build parts of wxWidgets as loadable components], wxUSE_PLUGINS)
WX_ARG_WITH(subdirs, [ --without-subdirs don't generate makefiles for samples/demos/...], wxWITH_SUBDIRS, without)
if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_GUI" = "yes"; then
@@ -7259,7 +7260,7 @@ dnl on platforms that do not have symlinks.
dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR:include ]) dnl AC_CONFIG_LINKS([ include/wx-$WX_RELEASE$WX_FLAVOUR:include ])
dnl AC_CONFIG_LINKS([ contrib/include ]) dnl AC_CONFIG_LINKS([ contrib/include ])
if test "$wxWITH_SUBDIRS" != "no"; then
dnl Configure samples, contrib etc. directories, but only if they are present: dnl Configure samples, contrib etc. directories, but only if they are present:
if test "$wxUSE_GUI" = "yes"; then if test "$wxUSE_GUI" = "yes"; then
SUBDIRS="samples demos utils contrib" SUBDIRS="samples demos utils contrib"
@@ -7316,7 +7317,7 @@ for subdir in `echo $SUBDIRS`; do
done done
fi fi
done done
fi dnl wxWITH_SUBDIRS
AC_OUTPUT AC_OUTPUT