Select Git revision
Forked from
Nettle / nettle
Source project has a limited visibility.
-
* aclocal.m4 (NETTLE_CHECK_IFUNC): fix quoting so that AC_LINK_IFELSE/AC_TRY_LINK is defined outside of this test. Signed-off-by:
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* aclocal.m4 (NETTLE_CHECK_IFUNC): fix quoting so that AC_LINK_IFELSE/AC_TRY_LINK is defined outside of this test. Signed-off-by:
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
aclocal.m4 37.29 KiB
dnl Try to detect the type of the third arg to getsockname() et al
AC_DEFUN([LSH_TYPE_SOCKLEN_T],
[AH_TEMPLATE([socklen_t], [Length type used by getsockopt])
AC_CACHE_CHECK([for socklen_t in sys/socket.h], ac_cv_type_socklen_t,
[AC_EGREP_HEADER(socklen_t, sys/socket.h,
[ac_cv_type_socklen_t=yes], [ac_cv_type_socklen_t=no])])
if test $ac_cv_type_socklen_t = no; then
AC_MSG_CHECKING(for AIX)
AC_EGREP_CPP(yes, [
#ifdef _AIX
yes
#endif
],[
AC_MSG_RESULT(yes)
AC_DEFINE(socklen_t, size_t)
],[
AC_MSG_RESULT(no)
AC_DEFINE(socklen_t, int)
])
fi
])
dnl Choose cc flags for compiling position independent code
dnl FIXME: Doesn't do the right thing when crosscompiling.
AC_DEFUN([LSH_CCPIC],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_MSG_CHECKING(CCPIC)
AC_CACHE_VAL(lsh_cv_sys_ccpic,[
if test -z "$CCPIC" ; then
if test "$GCC" = yes ; then
case "$host_os" in
bsdi4.*) CCPIC="-fPIC" ;;
bsdi*) CCPIC="" ;;
darwin*) CCPIC="-fPIC" ;;
# Could also use -fpic, depending on the number of symbol references
solaris*) CCPIC="-fPIC" ;;
cygwin*) CCPIC="" ;;
mingw32*) CCPIC="" ;;
*) CCPIC="-fpic" ;;
esac
else
case "$host_os" in
darwin*) CCPIC="-fPIC" ;;
irix*) CCPIC="-share" ;;
hpux*) CCPIC="+z"; ;;
*freebsd*) CCPIC="-fpic" ;;
sco*|sysv4.*) CCPIC="-KPIC -dy -Bdynamic" ;;
solaris*) CCPIC="-KPIC -Bdynamic" ;;
winnt*) CCPIC="-shared" ;;
*) CCPIC="" ;;
esac
fi
fi
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $CCPIC"
AC_TRY_COMPILE([], [exit(0);],
lsh_cv_sys_ccpic="$CCPIC", lsh_cv_sys_ccpic='')
CFLAGS="$OLD_CFLAGS"
])
CCPIC="$lsh_cv_sys_ccpic"
AC_MSG_RESULT($CCPIC)])
dnl LSH_PATH_ADD(path-id, directory)
AC_DEFUN([LSH_PATH_ADD],
[AC_MSG_CHECKING($2)
ac_exists=no
if test -d "$2/." ; then
ac_real_dir=`cd $2 && pwd`
if test -n "$ac_real_dir" ; then
ac_exists=yes