diff options
Diffstat (limited to 'libdecnumber')
-rw-r--r-- | libdecnumber/configure.ac | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/libdecnumber/configure.ac b/libdecnumber/configure.ac index 16c7465..2e95b82 100644 --- a/libdecnumber/configure.ac +++ b/libdecnumber/configure.ac @@ -99,8 +99,23 @@ AC_C_BIGENDIAN # Enable --enable-host-shared. AC_ARG_ENABLE(host-shared, [AS_HELP_STRING([--enable-host-shared], - [build host code as shared libraries])], -[PICFLAG=-fPIC], [PICFLAG=]) + [build host code as shared libraries])]) +AC_SUBST(enable_host_shared) + +# Enable --enable-host-pie. +AC_ARG_ENABLE(host-pie, +[AS_HELP_STRING([--enable-host-pie], + [build host code as PIE])]) +AC_SUBST(enable_host_pie) + +if test x$enable_host_shared = xyes; then + PICFLAG=-fPIC +elif test x$enable_host_pie = xyes; then + PICFLAG=-fPIE +else + PICFLAG= +fi + AC_SUBST(PICFLAG) # Output. |