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)