AC_CHECK_FUNC(getopt_long, [ getopt_long=true ], [ getopt_long=false ])
fi
-if test "${pthread}" = "true" ; then
- AC_ADD_GCC_CFLAGS([-pthread -D_REENTRANT])
- AC_DEFINE(HAVE_WXTHREADS)
-fi
-
if test "${getopt_long}" = "false" ; then
my_includes="$my_includes -I../getopt"
AC_DEFINE(HAVE_GETOPT_LONG)
AM_CONDITIONAL(DEBUG, test "$debug" = "true")
if test "$debug" = "true" ; then
-dnl AC_ADD_GCC_CFLAGS([-g -DDEBUG])
CFLAGS="-g -DDEBUG"
AC_DEFINE(DEBUG)
else
-dnl AC_ADD_GCC_CFLAGS([-O2 -fexpensive-optimizations -DNDEBUG])
CFLAGS="-O3 -DNDEBUG -fomit-frame-pointer"
AC_DEFINE(NDEBUG)
fi
+if test "${pthread}" = "true" ; then
+ CFLAGS="$FLAGS -pthread -D_REENTRANT"
+ AC_DEFINE(HAVE_WXTHREADS)
+fi
+
AC_MSG_CHECKING(sstream)
if [ test -f /usr/include/sstream || test -f /usr/include/g++/sstream ||
test -f /usr/include/g++-2/sstream || test -f /usr/include/g++-3/sstream ]; then
AC_MSG_RESULT(no)
-AC_ADD_GCC_CFLAGS([-Wall])
+CFLAGS="$CFLAGS -Wall"
AC_MSG_CHECKING(whether to enable verbose warnings)
AC_ARG_ENABLE(verbose-warnings,
[ --enable-verbose-warnings
[ case "$enableval" in
yes)
AC_MSG_RESULT(yes)
- AC_ADD_GCC_CFLAGS([-W])
- AC_ADD_GCC_CFLAGS([-Wshadow -Wpointer-arith -Wbad-function-cast])
- AC_ADD_GCC_CFLAGS([-Wcast-align -Wwrite-strings -Waggregate-return])
- AC_ADD_GCC_CFLAGS([-Wmissing-prototypes -Wstrict-prototypes])
- AC_ADD_GCC_CFLAGS([-pedantic])
- AC_ADD_GCC_CFLAGS([-Wredundant-decls])
-
+ CFLAGS="$CFLAGS -W -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wmissing-prototypes -Wstrict-prototypes -pedantic -Wredundant-decls"
;;
*)
AC_MSG_RESULT(no)
[ case "$enableval" in
yes)
AC_MSG_RESULT(yes)
- AC_ADD_GCC_CFLAGS([--static])
+ CFLAGS="$CFLAGS --static"
;;
*)
AC_MSG_RESULT(no)