summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authordsmith <dsmith>2008-01-24 18:11:34 +0000
committerdsmith <dsmith>2008-01-24 18:11:34 +0000
commit9921a199dd3d8bfce4cd2e4c95e17119903588ea (patch)
treee1092e24d1b65c1a1a44a8414ba8fd72bb9804a4 /configure.ac
parent5c5ab817b6e4a445546a5262123246d820e1ccec (diff)
downloadsystemtap-steved-9921a199dd3d8bfce4cd2e4c95e17119903588ea.tar.gz
systemtap-steved-9921a199dd3d8bfce4cd2e4c95e17119903588ea.tar.xz
systemtap-steved-9921a199dd3d8bfce4cd2e4c95e17119903588ea.zip
2008-01-24 David Smith <dsmith@redhat.com>
PR 5650 (partial). * configure.ac: Handles sqlite optional functionality correctly. If enabled/disabled by the user, do the right thing. If not specified by the user, use it if present. * configure: Regenerated. * systemtap.spec.in: Always specify to configure whether to use sqlite or not.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 20 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index c8b43fe0..79812c7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,13 +78,27 @@ if test "$enable_prologues" = yes; then
AC_DEFINE([ENABLE_PROLOGUES],[],[make -P prologue-searching default])
fi])
+AC_ARG_ENABLE([ssp],
+ [AC_HELP_STRING([--enable-ssp], [enable gcc stack-protector])])
+AS_IF([test "x$enable_ssp" == xyes],
+ [CFLAGS="$CFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"
+ CXXFLAGS="$CXXFLAGS -fstack-protector-all -D_FORTIFY_SOURCE=2"
+ AC_MSG_NOTICE([Compiling with gcc -fstack-protector-all et al.])])
-SAVE_LIBS="$LIBS"
-AC_CHECK_LIB(sqlite3, sqlite3_open)
-sqlite3_LIBS="$LIBS"
-AC_SUBST(sqlite3_LIBS)
-LIBS="$SAVE_LIBS"
-
+dnl Handle optional sqlite support. If enabled/disabled by the user,
+dnl do the right thing. If not specified by the user, use it if
+dnl present.
+AC_ARG_ENABLE([sqlite],
+ AS_HELP_STRING([--enable-sqlite], [build with sqlite support]),
+ [], dnl ACTION-IF-GIVEN
+ [enable_sqlite=check]) dnl ACTION-IF-NOT-GIVEN
+sqlite3_LIBS=
+AS_IF([test "x$enable_sqlite" != xno],
+ [AC_CHECK_LIB([sqlite3], [sqlite3_open],
+ [AC_SUBST([sqlite3_LIBS], [-lsqlite3])],
+ [if test "x$enable_sqlite" != xcheck; then
+ AC_MSG_FAILURE([--enable-sqlite was given, but test for sqlite failed])
+ fi])])
AC_ARG_ENABLE([ssp],
[AC_HELP_STRING([--enable-ssp], [enable gcc stack-protector])])