r1943: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 5 May 2002 09:15:03 +0000 (09:15 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 5 May 2002 09:15:03 +0000 (09:15 +0000)
configure.ac

index a9e407dde35068fc67d2e1b48c88113ec16f1edf..6bfbe85ea25052596105d96f3c5c026903d8cc06 100644 (file)
@@ -79,11 +79,6 @@ else
   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)
@@ -119,15 +114,18 @@ esac],
 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
@@ -137,7 +135,7 @@ fi
 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
@@ -145,13 +143,7 @@ AC_ARG_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)
@@ -166,7 +158,7 @@ AC_ARG_ENABLE(static,
 [ case "$enableval" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_ADD_GCC_CFLAGS([--static])
+    CFLAGS="$CFLAGS --static"
     ;;
   *)
     AC_MSG_RESULT(no)