summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-01-13 23:32:43 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-01-13 23:32:43 +0100
commit7677b1bdb5df04b2e780d1bacf76f9de3f64d478 (patch)
tree12caeb7855dea23849661439a18d673dec19eb08
parentbe3d7a2524a2526ed6a3a9064307ee1dd60dfa34 (diff)
downloadconnman-7677b1bdb5df04b2e780d1bacf76f9de3f64d478.tar.gz
connman-7677b1bdb5df04b2e780d1bacf76f9de3f64d478.tar.bz2
connman-7677b1bdb5df04b2e780d1bacf76f9de3f64d478.zip
Add options for debug and PIE support
-rwxr-xr-xbootstrap-configure1
-rw-r--r--configure.in19
2 files changed, 19 insertions, 1 deletions
diff --git a/bootstrap-configure b/bootstrap-configure
index 1da77dae..2b8dc78e 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -6,6 +6,7 @@ fi
./bootstrap && \
./configure --enable-maintainer-mode \
+ --enable-debug \
--prefix=/usr \
--mandir=/usr/share/man \
--localstatedir=/var \
diff --git a/configure.in b/configure.in
index 8f13afcd..0cbb0ad9 100644
--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,7 @@ AM_MAINTAINER_MODE
AC_PREFIX_DEFAULT(/usr/local)
if (test "${CFLAGS}" = ""); then
- CFLAGS="-Wall -O2"
+ CFLAGS="-Wall -O2 -D_FORTIFY_SOURCE=2"
fi
AC_LANG_C
@@ -24,6 +24,23 @@ m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
+AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
+ [enable compiling with debugging information]), [
+ if (test "${enableval}" = "yes" &&
+ test "${ac_cv_prog_cc_g}" = "yes"); then
+ CFLAGS="$CFLAGS -g"
+ fi
+])
+
+AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
+ [enable position independent executables flag]), [
+ if (test "${enableval}" = "yes" &&
+ test "${ac_cv_prog_cc_pie}" = "yes"); then
+ CFLAGS="$CFLAGS -fPIE"
+ LDFLAGS="$LDFLAGS -pie"
+ fi
+])
+
PKG_CHECK_MODULES(GMODULE, gmodule-2.0, dummy=yes,
AC_MSG_ERROR(gmodule is required))
AC_SUBST(GMODULE_CFLAGS)