This repository has been archived by the owner on Mar 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
configure.in
111 lines (92 loc) · 2.76 KB
/
configure.in
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
AM_INIT_AUTOMAKE(gmrun, 0.9.2)
AM_CONFIG_HEADER(config.h)
AC_ARG_ENABLE(debug,
[ --enable-debug=[no/yes] Debugging information == no <--> optimization == yes],,
enable_debug=no)
if [ ! test "x$enable_debug" != "xyes"]; then
CFLAGS="-g3 -O0 -DDEBUG"
CXXFLAGS="-g3 -O0 -DDEBUG"
fi
AC_ARG_ENABLE(system,
[ --enable-system=[yes/no] Use "system" libc function to run commands ],,
enable_system=no)
if [ ! test "x$enable_system" != "xyes"]; then
CFLAGS="$CFLAGS -DUSE_SYSTEM"
CXXFLAGS="$CXXFLAGS -DUSE_SYSTEM"
fi
AC_ARG_ENABLE(mtrace,
[ --enable-mtrace=[no/yes] Trace memory (de)allocation calls to detect memory leaks ],,
enable_mtrace=no)
if [ ! test "x$enable_mtrace" != "xyes"]; then
CFLAGS="$CFLAGS -DMTRACE"
CXXFLAGS="$CXXFLAGS -DMTRACE"
fi
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_PROG_CXX
AC_PATH_STLPORT_LIB
AC_PATH_STLPORT_INC
AC_CHECK_FUNC( poptGetContext,
,
AC_CHECK_LIB(popt,
poptGetContext,
LIBS="${LIBS} -lpopt",
echo "*** You need to get libpopt ***";exit
)
)
AC_CHECK_FUNC( XQueryPointer,
,
AC_CHECK_LIB(X11,
XQueryPointer,
LIBS="${LIBS} -lX11",
echo "*** You need to get libX11 ***";exit
)
)
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.4
gobject-2.0 >= 2.0.4
gthread-2.0 >= 2.0.4)
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.5)
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
dnl Set PACKAGE_DATA_DIR in config.h.
if test "x${datadir}" = 'x${prefix}/share'; then
if test "x${prefix}" = "xNONE"; then
prefix=/usr/local
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${ac_default_prefix}/share/${PACKAGE}")
PACKAGE_DATA_DIR="${ac_default_prefix}/share/${PACKAGE}"
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${prefix}/share/${PACKAGE}")
PACKAGE_DATA_DIR="${prefix}/share/${PACKAGE}"
fi
else
AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${datadir}/${PACKAGE}")
PACKAGE_DATA_DIR="${datadir}/${PACKAGE}"
fi
AC_SUBST(PACKAGE_DATA_DIR)
PREFIX=${prefix}
AC_SUBST(PREFIX)
dnl Set PACKAGE_SOURCE_DIR in config.h.
packagesrcdir=`cd $srcdir && pwd`
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}")
dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
esac
fi
changequote([,])dnl
AC_OUTPUT([
Makefile
src/Makefile
config/Makefile
gmrun.spec
])