-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
75 lines (60 loc) · 1.77 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
62
63
64
65
66
67
68
69
70
71
72
73
74
#
# Copyright (c) 2004-5 Don Stewart - http://www.cse.unsw.edu.au/~dons
# LGPL version 2.1 or later (see http://www.gnu.org/copyleft/lesser.html)
#
# SUBSTs go into config.mk.in (TOP,PREFIX,GHC,INSTAlL)
# AC_DEFINES go into config.h
# only AC_DEFINES are visible in Haskell src
# sanity test
AC_INIT(src/System/Loader/Package.hs)
# Prepare to generate the config.h.in file
AC_CONFIG_HEADERS([config.h])
# untested on earlier than 2.52, but it won't work anyway
AC_PREREQ(2.53)
# Find out what type of system we're running on
AC_CANONICAL_BUILD
Platform="$build_cpu-$build_vendor-$build_os"
# This isn't right for msys mingw.
PREFIX="$prefix"
if test "$prefix" = "NONE"
then
if test "$build_os" = "cygwin"
then
PREFIX="c:/cygwin$ac_default_prefix"
else
PREFIX="$ac_default_prefix"
fi
fi
AC_SUBST(PREFIX)
case $Platform in
*-apple-darwin*)
MACOSX=yes
AC_DEFINE_UNQUOTED(MACOSX, [1], [Defined if compiling on the mac])
LEADING_UNDERSCORE=1
;;
*)
MACOSX=no
LEADING_UNDERSCORE=0
;;
esac
if test "$build_os" = "mingw32"
then
AC_DEFINE(__MINGW32__,[1],[Defined if compiling with mingw])
LEADING_UNDERSCORE=1
fi
if test "$build_os" = "cygwin"
then
AC_DEFINE(CYGWIN,[1],[Defined if compiling with mingw])
LEADING_UNDERSCORE=1
fi
AC_DEFINE_UNQUOTED(LEADING_UNDERSCORE, $LEADING_UNDERSCORE,
[Whether symbols are prefixed with a leading underscore])
# Allow a debugging version of package-loader to be built
AC_ARG_ENABLE(debug,
[ --enable-debug Enable a debug version of hs-plugins to be built],
[
AC_DEFINE_UNQUOTED(DEBUG, [1], [Defined if a debugging version is to be built]) ],
[ : ])
AC_PROG_INSTALL
# System.Process uses cmd or command.com shell on Windows, doen't use Cygwin or MSYS shell
AC_OUTPUT