1
1
dnl Process this file with autoconf to produce a configure script.
2
dnl $Id: configure.in 777 2006-09-01 11:22:47Z kretek $
2
dnl $Id: configure.in 2460 2008-04-09 16:08:34Z eht16 $
4
4
AC_INIT(configure.in)
5
AM_INIT_AUTOMAKE(geany, 0.9)
5
AM_INIT_AUTOMAKE(geany, 0.14)
8
7
AM_CONFIG_HEADER(config.h)
16
# check for C++ compiler explicitly and fail if none is found, do this check
17
# after AC_PROG_CXX has set the CXX environment variable
18
AC_CHECK_PROG([have_cxx], [$CXX], [yes], [no])
19
if test "x$have_cxx" = "xno"; then
20
AC_MSG_ERROR([No C++ compiler not found. Please install a C++ compiler.])
31
LIBTOOL="$LIBTOOL --silent"
23
35
# Checks for header files.
27
36
AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h libintl.h limits.h stddef.h stdlib.h string.h sys/time.h unistd.h])
29
38
# Checks for typedefs, structures, and compiler characteristics.
40
44
# Checks for library functions.
45
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
52
AC_CHECK_FUNCS([gethostname ftruncate fgetpos getcwd gettimeofday isascii mblen memset mkstemp putenv realpath regcomp setenv strcasecmp strchr strdup strerror strrchr strspn strstr strtol])
45
AC_CHECK_FUNCS([gethostname ftruncate fgetpos getcwd isascii mblen memset mkstemp realpath regcomp strcasecmp strchr strdup strerror strrchr strstr strtol])
59
if test -d ".svn" -a -x "${SVN}"
51
SVN=`which svn 2>/dev/null`
52
if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}"
61
54
REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
55
# force debug mode for a SVN working copy
56
CFLAGS="-g -DGEANY_DEBUG $CFLAGS"
65
60
AC_DEFINE_UNQUOTED([REVISION], "$REVISION", [subversion revision number])
63
dnl Check for binary relocation support
64
dnl taken from Inkscape (Hongli Lai <h.lai@chello.nl>)
66
AC_ARG_ENABLE(binreloc,
67
[ --enable-binreloc compile with binary relocation support],
68
enable_binreloc=$enableval,enable_binreloc=no)
70
AC_MSG_CHECKING(whether binary relocation support should be enabled)
71
if test "$enable_binreloc" = "yes"; then
73
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
74
if test -e /proc/self/maps; then
78
AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
82
elif test "$enable_binreloc" = "auto"; then
83
AC_MSG_RESULT(yes when available)
84
AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
85
if test -e /proc/self/maps; then
89
AC_MSG_CHECKING(whether everything is installed to the same prefix)
90
if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
91
"$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
92
"$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
97
AC_MSG_NOTICE(Binary relocation support will be disabled.)
106
elif test "$enable_binreloc" = "no"; then
109
AC_MSG_RESULT(no (unknown value "$enable_binreloc"))
112
if test "$enable_binreloc" = "yes"; then
113
AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
68
pkg_modules="gtk+-2.0 >= 2.6.0"
69
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
70
AC_SUBST(PACKAGE_CFLAGS)
71
AC_SUBST(PACKAGE_LIBS)
74
AC_ARG_ENABLE(socket, AC_HELP_STRING([--enable-socket],[enable if you want to detect a running instance [[default=yes]]]),
75
[want_socket="$enableval"], [want_socket="yes"])
77
if test "x$want_socket" = "xyes"; then
78
AC_DEFINE(HAVE_SOCKET, 1, [Define if you want to detect a running instance])
118
gtk_modules="gtk+-2.0 >= 2.6.0"
119
PKG_CHECK_MODULES(GTK, [$gtk_modules])
123
# --disable-deprecated switch for GTK2 purification
124
AC_ARG_ENABLE(deprecated, [ --disable-deprecated Disable deprecated GTK functions. ],
125
[GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])
128
AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support [[default=no]]])], , enable_plugins=yes)
130
if test "x$enable_plugins" = "xyes" ; then
131
AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled.])
132
AM_CONDITIONAL(PLUGINS, true)
134
AM_CONDITIONAL(PLUGINS, false)
82
AC_ARG_ENABLE(vte, AC_HELP_STRING([--enable-vte],[enable if you want virtual termninal support [[default=yes]]]),
83
[want_vte="$enableval"], [want_vte="yes"])
85
# if test "$want_vte" = "yes"; then
86
# PKG_CHECK_MODULES(VTE, [vte],
87
# [AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])],
88
# [AC_MSG_ERROR([VTE support enabled, but VTE not found])])
89
# AC_CHECK_LIB(vte, vte_terminal_new,
90
# [AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])],
91
# [AC_MSG_ERROR([VTE support enabled, but VTE not found])], [])
94
137
# Check for random number paths (skip when cross compiling)
95
if test "x$build" = "x$target"; then
138
if test "x$build" = "x$host"; then
96
139
AC_CHECK_FILE([/dev/urandom], AC_DEFINE([HAVE_DEVURANDOM], [1], [Define that you found /dev/urandom]))
97
140
AC_CHECK_FILE([/dev/random], AC_DEFINE([HAVE_DEVRANDOM], [1], [Define that you found /dev/random]))
100
if test "x$target" = "xi386-mingw32msvc"; then
145
AC_CHECK_LIB(iberty, fnmatch, [], [
146
AC_MSG_ERROR([fnmatch dosn't present in libiberty. You need to update it, read http://geany.uvena.de/Support/CrossCompile for details.])
101
148
AC_DEFINE_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
105
AM_CONDITIONAL(MINGW, test "x$target" = "xi386-mingw32msvc")
152
AM_CONDITIONAL(MINGW, true)
155
AM_CONDITIONAL(MINGW, false)
159
dnl skip check if already decided
160
if test "x$want_socket" = "x"; then
162
AC_ARG_ENABLE(socket, AC_HELP_STRING([--enable-socket],[enable if you want to detect a running instance [[default=yes]]]),
163
[want_socket="$enableval"], [want_socket="yes"])
165
if test "x$want_socket" = "xyes"; then
166
AC_DEFINE(HAVE_SOCKET, 1, [Define if you want to detect a running instance])
167
# this should bring in libsocket on Solaris:
168
AC_SEARCH_LIBS([connect],[socket],[],[],[])
172
dnl skip check if already decided
173
if test "x$want_vte" = "x"; then
175
AC_ARG_ENABLE(vte, AC_HELP_STRING([--enable-vte],
176
[enable if you want virtual termninal support [[default=yes]]]),
177
[want_vte="$enableval"], [want_vte="yes"])
178
if test "x$want_vte" = "xyes"; then
179
AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])
181
AC_ARG_WITH(vte-module-path, AC_HELP_STRING([--with-vte-module-path=PATH],
182
[Path to a loadable libvte [[default=None]]]), [AC_DEFINE_UNQUOTED([VTE_MODULE_PATH],
183
["$withval"], [Path to a loadable libvte])])
108
186
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
189
# GTK 2.10 printing support
190
$PKG_CONFIG --exists 'gtk+-2.0 >= 2.10.0'
191
if test "x$?" = "x0" ; then
192
enable_printing="yes"
194
enable_printing="no (GTK >= 2.10 necessary)"
110
198
# just for a laugh (it has absolutely no effect)
111
199
AC_ARG_ENABLE(the-force, AC_HELP_STRING([--enable-the-force],
112
200
[enable if you are Luke Skywalker and the force is with you [[default=no]]]), [be_luke="$enableval"], [be_luke="no"])