diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-01-13 23:32:43 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-01-13 23:32:43 +0100 |
commit | 7677b1bdb5df04b2e780d1bacf76f9de3f64d478 (patch) | |
tree | 12caeb7855dea23849661439a18d673dec19eb08 | |
parent | be3d7a2524a2526ed6a3a9064307ee1dd60dfa34 (diff) | |
download | connman-7677b1bdb5df04b2e780d1bacf76f9de3f64d478.tar.gz connman-7677b1bdb5df04b2e780d1bacf76f9de3f64d478.tar.bz2 connman-7677b1bdb5df04b2e780d1bacf76f9de3f64d478.zip |
Add options for debug and PIE support
-rwxr-xr-x | bootstrap-configure | 1 | ||||
-rw-r--r-- | configure.in | 19 |
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) |