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)