-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathconfigure.ac
61 lines (51 loc) · 2.01 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
AC_INIT([Haskell libltdl interface], [0.1], [[email protected]], [libltdl])
AC_CONFIG_SRCDIR([Foreign/LibLTDL.hs])
dnl--------------------------------------------------------------------
dnl Specify which gcc to use
dnl--------------------------------------------------------------------
AC_ARG_WITH([gcc],
[AC_HELP_STRING([--with-gcc],
[which gcc to use])],
[if [[ -f `which cygpath` ]]; then
CC=`cygpath -m "$withval"`;
else
CC="$withval";
fi],
[])
dnl--------------------------------------------------------------------
dnl Find the Haskell compiler
dnl--------------------------------------------------------------------
AC_ARG_WITH([compiler],
[AC_HELP_STRING([--with-compiler], [path to Haskell compiler])],
[HC=$withval],
[AC_PATH_PROG(HC, ghc)])
dnl--------------------------------------------------------------------
dnl Extra include and library directories
dnl--------------------------------------------------------------------
AC_ARG_WITH([extra-includes],
[AC_HELP_STRING([--with-extra-includes],
[directory containing includes])],
[EXTRA_INCLUDE_DIRS=$withval; CPPFLAGS="$CPPFLAGS -I$withval"],
[EXTRA_INCLUDE_DIRS=])
AC_ARG_WITH([extra-libraries],
[AC_HELP_STRING([--with-extra-libraries],
[directory containing libraries])],
[EXTRA_LIB_DIRS=$withval; LDFLAGS="$LDFLAGS -L$withval"],
[EXTRA_LIB_DIRS=])
AC_SUBST(EXTRA_INCLUDE_DIRS)
AC_SUBST(EXTRA_LIB_DIRS)
dnl--------------------------------------------------------------------
dnl Find libltdl
dnl--------------------------------------------------------------------
GBM_CHECK_LIBRARY(ltdl,,ltdl.h,lt_dlinit)
AC_SUBST(LTDL_INCLUDE_DIRS)
AC_SUBST(LTDL_LIB_DIRS)
AC_SUBST(HAVE_LIB_LTDL)
AC_SUBST(LTDL_LIBS)
AC_SUBST(HAVE_FRAMEWORK_LTDL)
AC_SUBST(LTDL_FRAMEWORK)
dnl--------------------------------------------------------------------
dnl Finish up
dnl--------------------------------------------------------------------
AC_CONFIG_FILES([libltdl.buildinfo])
AC_OUTPUT