~ubuntu-branches/ubuntu/raring/geany/raring-proposed

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Damián Viano
  • Date: 2008-05-02 11:37:45 UTC
  • mfrom: (1.2.1 upstream) (9 hardy)
  • mto: (3.2.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: james.westby@ubuntu.com-20080502113745-xzp4g6dmovrpoj17
Tags: 0.14-1
New upstream release (Closes: #478126)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 $
3
3
 
4
4
AC_INIT(configure.in)
5
 
AM_INIT_AUTOMAKE(geany, 0.9)
6
 
 
 
5
AM_INIT_AUTOMAKE(geany, 0.14)
7
6
 
8
7
AM_CONFIG_HEADER(config.h)
9
8
 
10
 
AC_ISC_POSIX
 
9
AC_GNU_SOURCE
 
10
AC_AIX
 
11
AC_MINIX
 
12
 
11
13
AC_PROG_CC
12
 
AM_PROG_CC_STDC
13
 
AC_HEADER_STDC
 
14
 
14
15
AC_PROG_CXX
15
 
AC_PROG_CPP
16
 
AC_PROG_RANLIB
 
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.])
 
21
fi
 
22
 
 
23
#AC_PROG_RANLIB
17
24
AC_PROG_INSTALL
18
25
AC_PROG_LN_S
19
 
AC_PROG_MAKE_SET
 
26
AC_PROG_INTLTOOL
 
27
 
 
28
# for plugins
 
29
AC_DISABLE_STATIC
 
30
AM_PROG_LIBTOOL
 
31
LIBTOOL="$LIBTOOL --silent"
20
32
 
21
33
# autoscan start
22
34
 
23
35
# Checks for header files.
24
 
AC_HEADER_DIRENT
25
 
AC_HEADER_STDC
26
 
AC_HEADER_SYS_WAIT
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])
28
37
 
29
38
# Checks for typedefs, structures, and compiler characteristics.
30
 
AC_HEADER_STAT
31
 
AC_HEADER_STDBOOL
32
 
AC_C_CONST
33
 
AC_C_INLINE
34
39
AC_TYPE_OFF_T
35
40
AC_TYPE_SIZE_T
36
41
AC_HEADER_TIME
37
42
AC_STRUCT_TM
38
 
AC_C_VOLATILE
39
43
 
40
44
# Checks for library functions.
41
 
AC_FUNC_CLOSEDIR_VOID
42
 
AC_FUNC_ERROR_AT_LINE
43
 
#AC_REPLACE_FNMATCH
44
 
AC_FUNC_LSTAT
45
 
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
46
 
AC_FUNC_MALLOC
47
 
AC_FUNC_MEMCMP
48
 
AC_FUNC_REALLOC
49
 
AC_TYPE_SIGNAL
50
 
AC_FUNC_STAT
51
 
AC_FUNC_VPRINTF
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])
53
46
 
54
47
# autoscan end
55
48
 
56
49
 
57
50
# get svn revision
58
 
SVN=`which svn`
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}"
60
53
then
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"
62
57
else
63
58
        REVISION="-1"
64
59
fi
65
60
AC_DEFINE_UNQUOTED([REVISION], "$REVISION", [subversion revision number])
66
61
 
 
62
 
 
63
dnl Check for binary relocation support
 
64
dnl taken from Inkscape (Hongli Lai <h.lai@chello.nl>)
 
65
 
 
66
AC_ARG_ENABLE(binreloc,
 
67
       [  --enable-binreloc       compile with binary relocation support],
 
68
       enable_binreloc=$enableval,enable_binreloc=no)
 
69
 
 
70
AC_MSG_CHECKING(whether binary relocation support should be enabled)
 
71
if test "$enable_binreloc" = "yes"; then
 
72
       AC_MSG_RESULT(yes)
 
73
       AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
 
74
       if test -e /proc/self/maps; then
 
75
               AC_MSG_RESULT(yes)
 
76
       else
 
77
               AC_MSG_RESULT(no)
 
78
               AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
 
79
               enable_binreloc="no"
 
80
       fi
 
81
 
 
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
 
86
               AC_MSG_RESULT(yes)
 
87
               enable_binreloc=yes
 
88
 
 
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'
 
93
               then
 
94
                       AC_MSG_RESULT(yes)
 
95
               else
 
96
                       AC_MSG_RESULT(no)
 
97
                       AC_MSG_NOTICE(Binary relocation support will be disabled.)
 
98
                       enable_binreloc=no
 
99
               fi
 
100
 
 
101
       else
 
102
               AC_MSG_RESULT(no)
 
103
               enable_binreloc=no
 
104
       fi
 
105
 
 
106
elif test "$enable_binreloc" = "no"; then
 
107
       AC_MSG_RESULT(no)
 
108
else
 
109
       AC_MSG_RESULT(no (unknown value "$enable_binreloc"))
 
110
       enable_binreloc=no
 
111
fi
 
112
if test "$enable_binreloc" = "yes"; then
 
113
   AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
 
114
fi
 
115
 
 
116
 
67
117
# GTK checks
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)
72
 
 
73
 
# socket support
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"])
76
 
 
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])
 
120
AC_SUBST(GTK_CFLAGS)
 
121
AC_SUBST(GTK_LIBS)
 
122
 
 
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"], [])
 
126
 
 
127
# Plugins support
 
128
AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support  [[default=no]]])], , enable_plugins=yes)
 
129
 
 
130
if test "x$enable_plugins" = "xyes" ; then
 
131
        AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled.])
 
132
        AM_CONDITIONAL(PLUGINS, true)
 
133
else
 
134
        AM_CONDITIONAL(PLUGINS, false)
79
135
fi
80
136
 
81
 
# VTE support
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"])
84
 
 
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])], [])
92
 
# fi
93
 
 
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]))
98
141
fi
99
142
 
100
 
if test "x$target" = "xi386-mingw32msvc"; then
 
143
case "${host}" in
 
144
    *mingw*)
 
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.])
 
147
                ])
101
148
        AC_DEFINE_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
102
149
        want_vte="no"
 
150
        want_socket="no"
103
151
        AC_EXEEXT
104
 
fi
105
 
AM_CONDITIONAL(MINGW, test "x$target" = "xi386-mingw32msvc")
106
 
 
 
152
        AM_CONDITIONAL(MINGW, true)
 
153
        ;;
 
154
    *)
 
155
        AM_CONDITIONAL(MINGW, false)
 
156
        ;;
 
157
esac
 
158
 
 
159
dnl skip check if already decided
 
160
if test "x$want_socket" = "x"; then
 
161
    # socket support
 
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"])
 
164
 
 
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],[],[],[])
 
169
    fi
 
170
fi
 
171
 
 
172
dnl skip check if already decided
 
173
if test "x$want_vte" = "x"; then
 
174
    # VTE support
 
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])
 
180
    fi
 
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])])
 
184
fi
107
185
 
108
186
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
109
187
 
 
188
 
 
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"
 
193
else
 
194
        enable_printing="no (GTK >= 2.10 necessary)"
 
195
fi
 
196
 
 
197
 
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"])
122
210
AC_SUBST(GETTEXT_PACKAGE)
123
211
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
124
212
 
125
 
# Add the languages which your application supports here.
126
 
ALL_LINGUAS="be ca cs de es nl pl pt_BR ru vi"
 
213
ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`" # take all languages found in file po/LINGUAS
127
214
 
128
215
AM_GLIB_GNU_GETTEXT
 
216
# workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
 
217
if test "x$MSGFMT" = "xno"; then
 
218
        AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
 
219
fi
129
220
 
130
221
 
131
222
# Set ${datadir}
132
 
if test "x${datadir}" = 'x${prefix}/share'; then
 
223
if test "x${datadir}" = 'x${prefix}/share' -o "x${datarootdir}" = 'x${prefix}/share'; then
133
224
        if test "x${prefix}" = "xNONE"; then
134
225
                prefix=${ac_default_prefix}
135
226
        fi
136
227
fi
137
228
 
138
 
if test "x$want_vte" = "xyes"; then
139
 
        AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])
140
 
fi
141
 
 
142
 
GEANY_PIXMAPS_DIR=`eval echo ${datadir}/pixmaps`
 
229
GEANY_PIXMAPS_DIR=`eval echo ${datarootdir}/pixmaps`
143
230
AC_SUBST(GEANY_PIXMAPS_DIR)
144
 
GEANY_DATA_DIR=`eval echo ${datadir}/geany`
 
231
GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`
145
232
AC_SUBST(GEANY_DATA_DIR)
146
233
 
 
234
# intltool hack to define install_sh on Debian/Ubuntu systems
 
235
if test "x$install_sh" = "x"; then
 
236
        install_sh="`pwd`/install-sh"
 
237
        AC_SUBST(install_sh)
 
238
fi
147
239
 
148
240
AC_OUTPUT([
149
241
Makefile
 
242
icons/Makefile
 
243
icons/16x16/Makefile
150
244
tagmanager/Makefile
151
245
tagmanager/include/Makefile
152
246
scintilla/Makefile
153
247
scintilla/include/Makefile
154
248
src/Makefile
 
249
plugins/Makefile
155
250
po/Makefile.in
156
251
doc/Makefile
157
252
doc/geany.1
158
253
geany.spec
159
 
geany.desktop
 
254
geany.desktop.in
 
255
geany.pc
 
256
doc/Doxyfile
160
257
])
161
258
 
162
259
echo "----------------------------------------"
167
264
        echo "Building Geany for                 : ${target}"
168
265
fi
169
266
echo "Using GTK version                  : ${GTK_VERSION}"
 
267
echo "Build with GTK printing support    : ${enable_printing}"
 
268
echo "Build with plugin support          : ${enable_plugins}"
170
269
echo "Use virtual terminal support       : ${want_vte}"
171
270
echo "Use (UNIX domain) socket support   : ${want_socket}"
172
271
if test "${REVISION}" != "-1"