From 9921a199dd3d8bfce4cd2e4c95e17119903588ea Mon Sep 17 00:00:00 2001 From: dsmith Date: Thu, 24 Jan 2008 18:11:34 +0000 Subject: 2008-01-24 David Smith 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. --- configure.ac | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'configure.ac') 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])]) -- cgit