From: Marcel Holtmann Date: Sun, 13 Jan 2008 22:32:43 +0000 (+0100) Subject: Add options for debug and PIE support X-Git-Tag: 2.0_alpha~4939 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7677b1bdb5df04b2e780d1bacf76f9de3f64d478;p=framework%2Fconnectivity%2Fconnman.git Add options for debug and PIE support --- diff --git a/bootstrap-configure b/bootstrap-configure index 1da77da..2b8dc78 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 8f13afc..0cbb0ad 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)