diff options
author | Marcel Holtmann <marcel.holtmann@intel.com> | 2009-04-26 20:43:09 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel.holtmann@intel.com> | 2009-04-26 20:43:09 +0200 |
commit | edaa239e92e69577f840f58ea90025d299f2c42c (patch) | |
tree | 6766080ca2caa4df768f98bb5fb8450b8dc35906 | |
parent | 0b2c43c68e1238548665ffdae9a67897fc9a4692 (diff) | |
download | ofono-edaa239e92e69577f840f58ea90025d299f2c42c.tar.bz2 |
Add configure options for debug and PIE support
-rwxr-xr-x | bootstrap-configure | 1 | ||||
-rw-r--r-- | configure.ac | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/bootstrap-configure b/bootstrap-configure index 2d56ff31..fdf8f10b 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 da07ee31..03c7efe2 100644 --- a/configure.ac +++ b/configure.ac @@ -16,4 +16,21 @@ AC_PROG_CC AC_PROG_CC_PIE AC_PROG_INSTALL +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 +]) + AC_OUTPUT(Makefile) |