diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2020-10-20 21:39:23 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2020-10-20 21:39:23 (GMT) |
commit | 43b19e1c8e902e6e96a5ca912497268a19255ac5 (patch) | |
tree | a7fe52b58d5c5a543137dd2f08bfb42a8062df27 | |
parent | 39f8a5c2a48a209507dbc3fd407052999954a199 (diff) |
Detected when Position Independent Code is needed.
-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) |