]> git.ipfire.org Git - thirdparty/fcron.git/commitdiff
added option --with-cflags
authorThibault Godouet <yo8192@users.noreply.github.com>
Thu, 2 Nov 2000 19:11:01 +0000 (19:11 +0000)
committerThibault Godouet <yo8192@users.noreply.github.com>
Thu, 2 Nov 2000 19:11:01 +0000 (19:11 +0000)
added code to recompile fcron if we switch from debug mode to non debug mode
or the contrary

configure.in

index c65b2eacb4745c1bcab94fd6a23e4de4daa9087a..428c1dfa9512a5c6ab2bf3b6c095bad850112afa 100644 (file)
@@ -286,20 +286,44 @@ AC_SUBST(PROC)
 fi
 
 AC_ARG_WITH(debug,
-[  --with-debug=CFLAGS Use default debug flags or CFLAGS if given to compile fcron.],
+[  --with-debug=CFLAGS Use default debug flags or CFLAGS if given to compile fcron in debug mode.],
 [ case "$withval" in
   no)
-    CFLAGS="-O2 -Wall"
+    cflags="-O2 -Wall"
+    debug="0"
     ;;
   yes)
-    CFLAGS="-DDEBUG -g -DFOREGROUND -DMALLOC_CHECK_=2 -Wpointer-arith -Wstrict-prototypes"
+    cflags="-DDEBUG -g -DFOREGROUND -DMALLOC_CHECK_=2 -Wpointer-arith -Wstrict-prototypes"
+    debug="1"
     ;;
   *)
-    CFLAGS="$withval"
+    cflags="$withval"
+    debug="1"
     ;;
   esac ],
-    CFLAGS="-O2 -Wall"
+    cflags="-O2 -Wall"
+    debug="0"
 )
+DEBUG=$debug
+AC_SUBST(DEBUG)
+
+
+AC_ARG_WITH(cflags,
+[  --with-cflags=CFLAGS        Use CFLAGS flags to compile fcron.],
+[ case "$withval" in
+  no)
+    AC_MSG_ERROR(Need an explicit value for --with-cflags.)
+    ;;
+  yes)
+    AC_MSG_ERROR(Need an explicit value for --with-cflags.)
+    ;;
+  *)
+    cflags="$withval"
+    ;;
+  esac ],
+)
+CFLAGS=$cflags
+AC_DEFINE_UNQUOTED(CFLAGS, "$cflags")
 
 
 AC_MSG_CHECKING(location of man directory)