Skip to content
Snippets Groups Projects
Commit ea7a1447 authored by John Ericson's avatar John Ericson Committed by Marge Bot
Browse files

Adjust `FP_FIND_LIBFFI`

Just set vars, and `AC_SUBST` in top-level configure.

Don't define `HAVE_SYSTEM_LIBFFI` because nothing is using it. It hasn't
be in used since 36093407 (part of the
make build system).
parent 5170f42a
No related branches found
No related tags found
No related merge requests found
......@@ -970,6 +970,8 @@ dnl ################################################################
FP_FIND_LIBFFI
AC_SUBST(UseSystemLibFFI)
AC_SUBST(FFILibDir)
AC_SUBST(FFIIncludeDir)
dnl ** check whether we need -ldl to get dlopen()
AC_CHECK_LIB([dl], [dlopen], UseLibdl=YES, UseLibdl=NO)
......
dnl ** Have libffi?
dnl --------------------------------------------------------------
dnl Sets UseSystemLibFFI.
# FP_FIND_LIBFFI
# --------------------------------------------------------------
# Should we used libffi? (yes or no)
#
# Sets variables:
# - UseSystemLibFFI: [YES|NO]
# - FFILibDir: optional path
# - FFIIncludeDir: optional path
AC_DEFUN([FP_FIND_LIBFFI],
[
# system libffi
......@@ -28,8 +33,6 @@ AC_DEFUN([FP_FIND_LIBFFI],
fi
])
AC_SUBST(FFIIncludeDir)
AC_ARG_WITH([ffi-libraries],
[AS_HELP_STRING([--with-ffi-libraries=ARG],
[Find libffi in ARG [default=system default]])
......@@ -42,8 +45,6 @@ AC_DEFUN([FP_FIND_LIBFFI],
fi
])
AC_SUBST(FFILibDir)
AS_IF([test "$UseSystemLibFFI" = "YES"], [
CFLAGS2="$CFLAGS"
CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
......@@ -63,7 +64,7 @@ AC_DEFUN([FP_FIND_LIBFFI],
AC_CHECK_LIB(ffi, ffi_call,
[AC_CHECK_HEADERS(
[ffi.h],
[AC_DEFINE([HAVE_SYSTEM_LIBFFI], [1], [Define to 1 if you have libffi.])],
[],
[AC_MSG_ERROR([Cannot find ffi.h for system libffi])]
)],
[AC_MSG_ERROR([Cannot find system libffi])]
......
......@@ -33,6 +33,10 @@ GHC_CONVERT_PLATFORM_PARTS([host], [Host])
FPTOOLS_SET_PLATFORM_VARS([host], [Host])
FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host])
dnl ################################################################
dnl Check for libraries
dnl ################################################################
dnl ** check whether we need -ldl to get dlopen()
AC_CHECK_LIB([dl], [dlopen])
dnl ** check whether we have dlinfo
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment