Mention new openro command
[geany-mirror.git] / configure.ac
blob6b7178d10f1ab599d3514d480379f068fe2aab6a
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ([2.60])
4 AC_INIT([Geany], [1.22],
5                 [https://sourceforge.net/tracker/?group_id=153444&atid=787791])
6 AC_CONFIG_SRCDIR([src/geany.h])
7 AC_CONFIG_AUX_DIR([build-aux])
8 AC_CONFIG_MACRO_DIR([m4])
9 AM_INIT_AUTOMAKE
10 AC_CONFIG_HEADERS([config.h])
12 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
14 GEANY_PREFIX
15 GEANY_DOCDIR
17 GEANY_STATUS_ADD([Install Geany in], [${prefix}])
18 if test -n "${build}" -a -n "${target}"; then
19         GEANY_STATUS_ADD([Building Geany on], [${build}])
20         GEANY_STATUS_ADD([Building Geany for], [${target}])
23 # why do we use this?
24 AC_USE_SYSTEM_EXTENSIONS
26 AC_PROG_CC
28 AC_PROG_CXX
29 # check for C++ compiler explicitly and fail if none is found, do this check
30 # after AC_PROG_CXX has set the CXX environment variable
31 if ! which $CXX >/dev/null 2>&1; then
32         AC_MSG_ERROR([No C++ compiler found. Please install a C++ compiler.])
35 AC_PROG_INSTALL
36 AC_PROG_LN_S
38 # autoscan start
40 # Checks for header files.
41 AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h regex.h stdlib.h sys/time.h])
43 # Checks for typedefs, structures, and compiler characteristics.
44 AC_TYPE_OFF_T
45 AC_TYPE_SIZE_T
46 AC_STRUCT_TM
48 # Checks for library functions.
49 AC_CHECK_FUNCS([gethostname ftruncate fgetpos mkstemp strerror strstr])
51 # autoscan end
54 # check for SVN revision
55 GEANY_CHECK_REVISION([dnl force debug mode for a SVN working copy
56                                           CFLAGS="-g -DGEANY_DEBUG $CFLAGS"])
59 # GTK/GLib/GIO checks
60 gtk_modules="gtk+-2.0 >= 2.16 glib-2.0 >= 2.20 gio-2.0 >= 2.20"
61 PKG_CHECK_MODULES([GTK], [$gtk_modules])
62 AC_SUBST([GTK_CFLAGS])
63 AC_SUBST([GTK_LIBS])
64 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
65 GEANY_STATUS_ADD([Using GTK version], [${GTK_VERSION}])
66 # GTHREAD checks
67 gthread_modules="gthread-2.0"
68 PKG_CHECK_MODULES([GTHREAD], [$gthread_modules])
69 AC_SUBST([GTHREAD_CFLAGS])
70 AC_SUBST([GTHREAD_LIBS])
72 # --disable-deprecated switch for GTK2 purification
73 AC_ARG_ENABLE([deprecated],
74                 [AS_HELP_STRING([--disable-deprecated], [Disable deprecated GTK functions.])],
75                 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"],
76                 [])
79 # Check for binary relocation support
80 GEANY_CHECK_BINRELOC
81 # Plugins support
82 GEANY_CHECK_PLUGINS
83 # check whether to use included GNU regex library
84 GEANY_CHECK_GNU_REGEX
85 # check for mingw specific settings
86 GEANY_CHECK_MINGW
88 GEANY_CHECK_SOCKET
89 GEANY_CHECK_VTE
90 GEANY_CHECK_THE_FORCE dnl hehe
92 # i18n
93 GEANY_I18N
95 GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`
96 AC_SUBST([GEANY_DATA_DIR])
98 # Output
99 AC_CONFIG_FILES([
100                 Makefile
101                 icons/Makefile
102                 icons/16x16/Makefile
103                 icons/48x48/Makefile
104                 icons/scalable/Makefile
105                 tagmanager/Makefile
106                 tagmanager/include/Makefile
107                 tagmanager/mio/Makefile
108                 scintilla/Makefile
109                 scintilla/include/Makefile
110                 src/Makefile
111                 plugins/Makefile
112                 po/Makefile.in
113                 doc/Makefile
114                 doc/geany.1
115                 geany.spec
116                 geany.pc
117                 doc/Doxyfile
119 AC_OUTPUT
121 # Summary
122 GEANY_STATUS_OUTPUT
123 echo ""
124 echo "Configuration is done OK."
125 echo ""