diff options
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 855091f..3837315 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,16 @@ AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LIBTOOL +AC_EGREP_CPP(yes, +[#ifdef __PIE__ + yes +#endif +], has_default_pie=yes, has_default_pie=no) + +if test "x$has_default_pie" = "xyes"; then + CFLAGS="$CFLAGS -fPIC" +fi + AC_PATH_PROG(YACC_INST, $YACC) AC_PATH_PROG(LEX_INST, $LEX) |