Add configure options for debug and PIE support

This commit is contained in:
Marcel Holtmann 2009-04-26 20:43:09 +02:00
parent 0b2c43c68e
commit edaa239e92
2 changed files with 18 additions and 0 deletions

View File

@ -6,6 +6,7 @@ fi
./bootstrap && \
./configure --enable-maintainer-mode \
--enable-debug \
--prefix=/usr \
--mandir=/usr/share/man \
--sysconfdir=/etc

View File

@ -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)