-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathconfigure.ac
94 lines (73 loc) · 2.4 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
AC_PREREQ(2.52)
AC_INIT(gworkspace, 1.0.0)
if test -z "$GNUSTEP_MAKEFILES"; then
AC_MSG_ERROR([You must run the GNUstep initialization script first!])
fi
#--------------------------------------------------------------------
# Find the compiler
#--------------------------------------------------------------------
if test "$CC" = ""; then
CC=`gnustep-config --variable=CC`
fi
if test "$CPP" = ""; then
CPP=`gnustep-config --variable=CPP`
fi
if test "$CXX" = ""; then
CXX=`gnustep-config --variable=CXX`
fi
AC_PROG_CC
AC_PROG_CPP
MAKECC=`gnustep-config --variable=CC`
if test "$CC" != "$MAKECC"; then
AC_MSG_ERROR([You are running configure with the compiler ($CC) set to a different value from that used by gnustep-make ($MAKECC). Please run configure again with your environment set to match your gnustep-make])
exit 1
fi
AC_SUBST(CC)
AC_SUBST(CPP)
AC_SUBST(CXX)
export CC
export CPP
export CXX
#--------------------------------------------------------------------
# Use config.guess, config.sub and install-sh provided by gnustep-make
#--------------------------------------------------------------------
AC_CONFIG_AUX_DIR([$GNUSTEP_MAKEFILES])
AC_CHECK_HEADERS(dir.h unistd.h sys/resource.h)
AC_CHECK_FUNCS(getpwnam getpwuid geteuid getlogin)
AC_CONFIG_AUX_DIR([$GNUSTEP_MAKEFILES])
AC_CONFIG_SUBDIRS([FSNode Inspector])
AC_ARG_ENABLE(gwmetadata,
[ --enable-gwmetadata Enable GWMetadata], , [enable_gwmetadata=no])
if test "x$enable_gwmetadata" = "xyes"; then
AC_CONFIG_SUBDIRS([GWMetadata])
BUILD_GWMETADATA=1
else
BUILD_GWMETADATA=0
fi
AC_SUBST(BUILD_GWMETADATA)
AC_CONFIG_HEADER([GWorkspace/config.h])
#--------------------------------------------------------------------
# Debug logging
#--------------------------------------------------------------------
AC_ARG_ENABLE(debug_log,
[ --enable-debug-log Enable debug logging],,
enable_debug_log=no)
if test "$enable_debug_log" = "yes"; then
GW_DEBUG_LOG=1
else
GW_DEBUG_LOG=0
fi
AC_DEFINE_UNQUOTED([GW_DEBUG_LOG], [$GW_DEBUG_LOG], [debug logging])
#--------------------------------------------------------------------
# fswatcher-inotify
#--------------------------------------------------------------------
AC_ARG_WITH(inotify,
[ --with-inotify Build fswatcher-inotify],
with_inotify=yes, with_inotify=no)
AC_SUBST(with_inotify)
AC_CONFIG_FILES([
GNUmakefile
GWorkspace/GNUmakefile
Tools/fswatcher/GNUmakefile
])
AC_OUTPUT