summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2019-11-29 12:32:23 +1100
committerDamien Miller <djm@mindrot.org>2019-11-29 12:32:23 +1100
commitb218055e59a7c1a1816f7a55ca18e3f3c05d63a4 (patch)
tree10bc1600b9dca94071750cba7cc637158450cba7 /configure.ac
parent0dedb703adcd98d0dbc4479f5f312a2bd3df2850 (diff)
(yet) another x-platform fix for sk-dummy.so
Check for -fPIC support from compiler Compile libopenbsd-compat -fPIC Don't mix -fPIE and -fPIC when compiling
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 1749b2903..c57b2401f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1725,6 +1725,18 @@ if test "x$use_pie" != "xno"; then
1725 fi 1725 fi
1726fi 1726fi
1727 1727
1728AC_MSG_CHECKING([whether -fPIC is accepted])
1729SAVED_CFLAGS="$CFLAGS"
1730CFLAGS="$CFLAGS -fPIC"
1731AC_COMPILE_IFELSE(
1732 [AC_LANG_PROGRAM( [[ #include <stdlib.h> ]], [[ exit(0); ]] )],
1733 [AC_MSG_RESULT([yes])
1734 PICFLAG="-fPIC"; ],
1735 [AC_MSG_RESULT([no])
1736 PICFLAG=""; ])
1737CFLAGS="$SAVED_CFLAGS"
1738AC_SUBST([PICFLAG])
1739
1728dnl Checks for library functions. Please keep in alphabetical order 1740dnl Checks for library functions. Please keep in alphabetical order
1729AC_CHECK_FUNCS([ \ 1741AC_CHECK_FUNCS([ \
1730 Blowfish_initstate \ 1742 Blowfish_initstate \
@@ -5301,6 +5313,10 @@ AC_SUBST([DEPEND], [$(cat $srcdir/.depend)])
5301CFLAGS="${CFLAGS} ${CFLAGS_AFTER}" 5313CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
5302LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}" 5314LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
5303 5315
5316# Make a copy of CFLAGS without -fpie
5317CFLAGS_NOPIE=`echo "$CFLAGS" | sed 's/ -fPIE//'`
5318AC_SUBST([CFLAGS_NOPIE])
5319
5304AC_EXEEXT 5320AC_EXEEXT
5305AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \ 5321AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
5306 openbsd-compat/Makefile openbsd-compat/regress/Makefile \ 5322 openbsd-compat/Makefile openbsd-compat/regress/Makefile \