-
Notifications
You must be signed in to change notification settings - Fork 47
/
configure.ac
43 lines (35 loc) · 1.31 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
AC_INIT([Haskell directory package], [1.0], [[email protected]], [directory])
# Safety check: Ensure that we are in the correct source directory.
AC_CONFIG_SRCDIR([System/Directory.hs])
AC_CONFIG_HEADERS([HsDirectoryConfig.h])
# Autoconf chokes on spaces, but we may receive a path from Cabal containing
# spaces. In that case, we just ignore Cabal's suggestion.
set_with_gcc() {
case $withval in
*" "*)
AC_MSG_WARN([--with-gcc ignored due to presence of spaces]);;
*)
CC=$withval
esac
}
# Legacy support for setting the C compiler with Cabal<1.24
# Newer versions use Autoconf's native `CC=...` facility
AC_ARG_WITH([gcc],
[C compiler],
[set_with_gcc])
# avoid warnings when run via Cabal
AC_ARG_WITH([compiler],
[GHC compiler],
[])
AC_PROG_CC()
# check for specific header (.h) files that we are interested in
AC_CHECK_HEADERS([fcntl.h limits.h sys/types.h sys/stat.h time.h])
AC_CHECK_FUNCS([realpath])
AC_CHECK_FUNCS([utimensat])
AC_CHECK_FUNCS([CreateSymbolicLinkW])
AC_CHECK_FUNCS([GetFinalPathNameByHandleW])
# EXTEXT is defined automatically by AC_PROG_CC;
# we just need to capture it in the header file
AC_DEFINE_UNQUOTED([EXE_EXTENSION], ["$EXEEXT"],
[Filename extension of executable files])
AC_OUTPUT