Commit 19094cdf authored by coppro's avatar coppro

Fixed some major build system flaws

parent c67ba8bd
...@@ -3440,16 +3440,17 @@ fi ...@@ -3440,16 +3440,17 @@ fi
# Check whether --enable-debug was given. # Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then : if test "${enable_debug+set}" = set; then :
enableval=$enable_debug; DEBUG=1 enableval=$enable_debug;
fi fi
if test "x${DEBUG}" = x1; then if test "x${enable_debug}" = "xyes"; then
DEFAULT_CXXFLAGS="-ggdb -O0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC" DEFAULT_CXXFLAGS="-ggdb -O0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC"
WXCONFIG_FLAGS="--debug --unicode=no" WXCONFIG_FLAGS="--debug"
else else
DEFAULT_CXXFLAGS="-O2" DEFAULT_CXXFLAGS="-O2"
WXCONFIG_FLAGS="--unicode=no" WXCONFIG_FLAGS=""
fi fi
if test X$user_set_cxxflags != Xyes; then if test X$user_set_cxxflags != Xyes; then
CXXFLAGS=${DEFAULT_CXXFLAGS} CXXFLAGS=${DEFAULT_CXXFLAGS}
fi fi
...@@ -4746,15 +4747,15 @@ fi ...@@ -4746,15 +4747,15 @@ fi
WX_VERSION="" WX_VERSION=""
min_wx_version=2.8.0 min_wx_version=2.8.0
if test -z "${WX_CONFIG_FLAGS}" ; then if test -z "${WXCONFIG_FLAGS}" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version" >&5
$as_echo_n "checking for wxWidgets version >= $min_wx_version... " >&6; } $as_echo_n "checking for wxWidgets version >= $min_wx_version... " >&6; }
else else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version (${WX_CONFIG_FLAGS})" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wxWidgets version >= $min_wx_version (${WXCONFIG_FLAGS})" >&5
$as_echo_n "checking for wxWidgets version >= $min_wx_version (${WX_CONFIG_FLAGS})... " >&6; } $as_echo_n "checking for wxWidgets version >= $min_wx_version (${WXCONFIG_FLAGS})... " >&6; }
fi fi
WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args ${WX_CONFIG_FLAGS} " WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args ${WXCONFIG_FLAGS} "
WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`
wx_config_major_version=`echo $WX_VERSION | \ wx_config_major_version=`echo $WX_VERSION | \
...@@ -4876,7 +4877,7 @@ $as_echo "no (version $WX_VERSION is not new enough)" >&6; } ...@@ -4876,7 +4877,7 @@ $as_echo "no (version $WX_VERSION is not new enough)" >&6; }
WX_LIBS="" WX_LIBS=""
WX_LIBS_STATIC="" WX_LIBS_STATIC=""
WX_RESCOMP="" WX_RESCOMP=""
: HAVE_WX=0
fi fi
else else
...@@ -4888,7 +4889,7 @@ $as_echo "no (version $WX_VERSION is not new enough)" >&6; } ...@@ -4888,7 +4889,7 @@ $as_echo "no (version $WX_VERSION is not new enough)" >&6; }
WX_LIBS_STATIC="" WX_LIBS_STATIC=""
WX_RESCOMP="" WX_RESCOMP=""
: HAVE_WX=0
fi fi
...@@ -4918,15 +4919,13 @@ fi ...@@ -4918,15 +4919,13 @@ fi
# Check whether --enable-pch was given. # Check whether --enable-pch was given.
if test "${enable_pch+set}" = set; then : if test "${enable_pch+set}" = set; then :
enableval=$enable_pch; PCH=1 enableval=$enable_pch;
else
PCH=0
fi fi
# Check for precompiled headers # Check for precompiled headers
# TODO: Deal with braindead GCC and actually check # TODO: Deal with braindead GCC and actually check
if test "x$PCH" = "x1" -a "x$CXX" = "xg++"; then if test "x$enable_pch" = "xyes" -a "x$CXX" = "xg++"; then
GLIBCPP_BUILD_PCH_TRUE= GLIBCPP_BUILD_PCH_TRUE=
GLIBCPP_BUILD_PCH_FALSE='#' GLIBCPP_BUILD_PCH_FALSE='#'
else else
......
...@@ -19,14 +19,15 @@ if test -n "${CXXFLAGS}"; then ...@@ -19,14 +19,15 @@ if test -n "${CXXFLAGS}"; then
fi fi
AC_PROG_CXX AC_PROG_CXX
AC_ARG_ENABLE(debug, [--enable-debug Enable debug build (requires debug AC_ARG_ENABLE(debug, [--enable-debug Enable debug build (requires debug
versions of wxWidgets and libstdc++.], [DEBUG=1]) versions of wxWidgets and libstdc++.])
if test "x${DEBUG}" = x1; then if test "x${enable_debug}" = "xyes"; then
DEFAULT_CXXFLAGS="-ggdb -O0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC" DEFAULT_CXXFLAGS="-ggdb -O0 -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC"
WXCONFIG_FLAGS="--debug --unicode=no" WXCONFIG_FLAGS="--debug"
else else
DEFAULT_CXXFLAGS="-O2" DEFAULT_CXXFLAGS="-O2"
WXCONFIG_FLAGS="--unicode=no" WXCONFIG_FLAGS=""
fi fi
if test X$user_set_cxxflags != Xyes; then if test X$user_set_cxxflags != Xyes; then
CXXFLAGS=${DEFAULT_CXXFLAGS} CXXFLAGS=${DEFAULT_CXXFLAGS}
fi fi
...@@ -41,7 +42,7 @@ BOOST_REGEX_LIB="-Wl,-Bstatic $BOOST_REGEX_LIB -Wl,-Bdynamic" ...@@ -41,7 +42,7 @@ BOOST_REGEX_LIB="-Wl,-Bstatic $BOOST_REGEX_LIB -Wl,-Bdynamic"
# Check for wxWidgets # Check for wxWidgets
AM_OPTIONS_WXCONFIG AM_OPTIONS_WXCONFIG
AM_PATH_WXCONFIG([2.8.0],[HAVE_WX=1],,,${WX_CONFIG_FLAGS}) AM_PATH_WXCONFIG([2.8.0],[HAVE_WX=1],[HAVE_WX=0],,${WXCONFIG_FLAGS})
if test "${HAVE_WX}" != 1; then if test "${HAVE_WX}" != 1; then
AC_MSG_ERROR([ AC_MSG_ERROR([
wxWindows must be installed on your system wxWindows must be installed on your system
...@@ -58,11 +59,11 @@ fi ...@@ -58,11 +59,11 @@ fi
AC_ARG_ENABLE(pch, [--enable-pch Enable precompiled headers (Requires AC_ARG_ENABLE(pch, [--enable-pch Enable precompiled headers (Requires
GCC of sufficiently high version). Speeds up compile times GCC of sufficiently high version). Speeds up compile times
significantly... if it works.], [PCH=1], [PCH=0]) significantly... if it works.])
# Check for precompiled headers # Check for precompiled headers
# TODO: Deal with braindead GCC and actually check # TODO: Deal with braindead GCC and actually check
AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "x$PCH" = "x1" -a "x$CXX" = "xg++") AM_CONDITIONAL(GLIBCPP_BUILD_PCH, test "x$enable_pch" = "xyes" -a "x$CXX" = "xg++")
# Checks for header files. # Checks for header files.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment