diff --git a/configure b/configure index 21e7b547..ab349b78 100755 --- a/configure +++ b/configure @@ -2971,7 +2971,8 @@ fi # Check whether --enable-run-from-source was given. if test "${enable_run_from_source+set}" = set; then : enableval=$enable_run_from_source; if test "x$enableval" = "xyes" ; then - appendCXX -DRUN_FROM_SOURCE + $as_echo "#define RUN_FROM_SOURCE 1" >>confdefs.h + fi RUNFROMSOURCE="$enableval" else @@ -2987,9 +2988,15 @@ fi if test "$DEBUG" != "no"; then - appendCXX -ggdb -D_DEBUG + $as_echo "#define _DEBUG 1" >>confdefs.h + # These enable some debug options in g++'s STL, e.g. invalid use of iterators - appendCXX -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_CONCEPT_CHECKS + $as_echo "#define _GLIBCXX_DEBUG 1" >>confdefs.h + + $as_echo "#define _GLIBCXX_DEBUG_PEDANTIC 1" >>confdefs.h + + $as_echo "#define _GLIBCXX_CONCEPT_CHECKS 1" >>confdefs.h + else if test "x$OPTIMIZE" = "xyes"; then appendCXX -O2 @@ -2997,7 +3004,8 @@ else fi if test "$IPV6" != "no"; then - appendCXX -DHAVE_IPV6 + $as_echo "#define HAVE_IPV6 1" >>confdefs.h + fi if test "x$GXX" = "xyes"; then @@ -3005,7 +3013,8 @@ if test "x$GXX" = "xyes"; then fi if test "$POLL" = "yes"; then - appendCXX -DCSOCK_USE_POLL + $as_echo "#define CSOCK_USE_POLL 1" >>confdefs.h + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getopt_long in -lgnugetopt" >&5 @@ -3055,7 +3064,8 @@ fi ac_fn_cxx_check_func "$LINENO" "lstat" "ac_cv_func_lstat" if test "x$ac_cv_func_lstat" = x""yes; then : - appendCXX -DHAVE_LSTAT + $as_echo "#define HAVE_LSTAT 1" >>confdefs.h + fi @@ -3340,7 +3350,9 @@ $as_echo "$as_me: WARNING: c-ares was not found and thus disabled" >&2;} fi else - appendCXX $c_ares_CFLAGS -DHAVE_C_ARES + $as_echo "#define HAVE_C_ARES 1" >>confdefs.h + + appendCXX $c_ares_CFLAGS appendLib $c_ares_LIBS ARES=yes fi @@ -3638,7 +3650,8 @@ $as_echo "$as_me: WARNING: OpenSSL was not found and thus disabled" >&2;} NOSSL=1 else - appendCXX -DHAVE_LIBSSL + $as_echo "#define HAVE_LIBSSL 1" >>confdefs.h + SSL=yes fi else diff --git a/configure.in b/configure.in index 22dae2e5..7055a723 100644 --- a/configure.in +++ b/configure.in @@ -124,7 +124,7 @@ AC_ARG_ENABLE( [c-ares], AC_ARG_ENABLE( [run-from-source], AS_HELP_STRING([--enable-run-from-source], [znc will be runnable without installation]), [if test "x$enableval" = "xyes" ; then - appendCXX -DRUN_FROM_SOURCE + AC_DEFINE([RUN_FROM_SOURCE]) fi RUNFROMSOURCE="$enableval"], [RUNFROMSOURCE="no"]) @@ -134,9 +134,11 @@ AC_ARG_ENABLE( [poll], [POLL="yes"]) if test "$DEBUG" != "no"; then - appendCXX -ggdb -D_DEBUG + AC_DEFINE([_DEBUG]) # These enable some debug options in g++'s STL, e.g. invalid use of iterators - appendCXX -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCXX_CONCEPT_CHECKS + AC_DEFINE([_GLIBCXX_DEBUG]) + AC_DEFINE([_GLIBCXX_DEBUG_PEDANTIC]) + AC_DEFINE([_GLIBCXX_CONCEPT_CHECKS]) else if test "x$OPTIMIZE" = "xyes"; then appendCXX -O2 @@ -144,7 +146,7 @@ else fi if test "$IPV6" != "no"; then - appendCXX -DHAVE_IPV6 + AC_DEFINE([HAVE_IPV6]) fi if test "x$GXX" = "xyes"; then @@ -152,11 +154,11 @@ if test "x$GXX" = "xyes"; then fi if test "$POLL" = "yes"; then - appendCXX -DCSOCK_USE_POLL + AC_DEFINE([CSOCK_USE_POLL]) fi AC_CHECK_LIB( gnugetopt, getopt_long,) -AC_CHECK_FUNC([lstat], [appendCXX -DHAVE_LSTAT]) +AC_CHECK_FUNC([lstat], [AC_DEFINE([HAVE_LSTAT])]) PKG_PROG_PKG_CONFIG() # ----- Check for dlopen @@ -196,7 +198,8 @@ Disabling c-ares may result in a slight performance decrease but will not have a Disabling c-ares may result in a slight performance decrease but will not have any other side-effects], [c-ares was not found and thus disabled]) else - appendCXX $c_ares_CFLAGS -DHAVE_C_ARES + AC_DEFINE([HAVE_C_ARES]) + appendCXX $c_ares_CFLAGS appendLib $c_ares_LIBS ARES=yes fi @@ -230,7 +233,7 @@ if test "x$SSL" != "xno"; then [OpenSSL was not found and thus disabled]) NOSSL=1 else - appendCXX -DHAVE_LIBSSL + AC_DEFINE([HAVE_LIBSSL]) SSL=yes fi else