aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-08-12 07:42:39 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-08-12 07:42:39 +0200
commitd1b5a2eb3d4007d69cb6a5d5bbfc2fbdde1e7485 (patch)
treea676fdd36ceb0742f86ee699f5311d810ae77f80
parent25d096237a2c0035a674253f5237afa1e10d9a34 (diff)
downloadconnman-gnome-d1b5a2eb3d4007d69cb6a5d5bbfc2fbdde1e7485.tar.gz
Add option to enable debugging information
-rwxr-xr-xbootstrap-configure1
-rw-r--r--configure.ac17
2 files changed, 18 insertions, 0 deletions
diff --git a/bootstrap-configure b/bootstrap-configure
index 2d56ff3..fdf8f10 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 \
--sysconfdir=/etc
diff --git a/configure.ac b/configure.ac
index db0d951..fc6f519 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,23 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])
+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 -O0"
+ 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(DBUS, dbus-glib-1 >= 0.70, dummy=yes,
AC_MSG_ERROR(dbus-glib > = 0.70 is required))
AC_SUBST(DBUS_CFLAGS)