Remove redundant GEANY_EXPORT_SYMBOL usage in callbacks.h
[geany-mirror.git] / configure.ac
blob2b828bb548169ae55a3ba2b56e7997eb811e1e31
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ([2.60])
4 AC_INIT([Geany], [1.25],
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([1.11 -Wall parallel-tests subdir-objects])
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 m4_ifdef([AM_PROG_AR],[AM_PROG_AR])
27 AC_PROG_CC
28 AC_PROG_CC_C99
29 AM_PROG_CC_C_O
31 AC_PROG_CXX
32 # check for C++ compiler explicitly and fail if none is found, do this check
33 # after AC_PROG_CXX has set the CXX environment variable
34 if ! which $CXX >/dev/null 2>&1; then
35         AC_MSG_ERROR([No C++ compiler found. Please install a C++ compiler.])
38 AC_PROG_INSTALL
39 AC_PROG_LN_S
41 # autoscan start
43 # Checks for header files.
44 AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h stdlib.h sys/time.h])
46 # Checks for typedefs, structures, and compiler characteristics.
47 AC_TYPE_OFF_T
48 AC_TYPE_SIZE_T
49 AC_STRUCT_TM
51 # Checks for library functions.
52 AC_CHECK_FUNCS([ftruncate fgetpos fnmatch mkstemp strerror strstr])
54 # autoscan end
57 # check for SVN revision
58 GEANY_CHECK_REVISION([dnl force debug mode for a SVN working copy
59                                           CFLAGS="-g -DGEANY_DEBUG $CFLAGS"])
62 AC_ARG_ENABLE([gtk3],
63                 [AS_HELP_STRING([--enable-gtk3],
64                                                 [compile with GTK3 support (experimental) [default=no]])],
65                 [enable_gtk3=$enableval],
66                 [enable_gtk3=no])
68 AS_IF([test "x$enable_gtk3" = xyes],
69           [gtk_package=gtk+-3.0
70            gtk_min_version=3.0],
71           [gtk_package=gtk+-2.0
72            gtk_min_version=2.16])
73 AM_CONDITIONAL([GTK3], [test "x$gtk_package" = "xgtk+-3.0"])
75 # GTK/GLib/GIO checks
76 gtk_modules="$gtk_package >= $gtk_min_version glib-2.0 >= 2.20"
77 gtk_modules_private="gio-2.0 >= 2.20 gmodule-no-export-2.0"
78 PKG_CHECK_MODULES([GTK], [$gtk_modules $gtk_modules_private])
79 AC_SUBST([DEPENDENCIES], [$gtk_modules])
80 AC_SUBST([GTK_CFLAGS])
81 AC_SUBST([GTK_LIBS])
82 GTK_VERSION=`$PKG_CONFIG --modversion $gtk_package`
83 GEANY_STATUS_ADD([Using GTK version], [${GTK_VERSION}])
84 # GTHREAD checks
85 gthread_modules="gthread-2.0"
86 PKG_CHECK_MODULES([GTHREAD], [$gthread_modules])
87 AC_SUBST([GTHREAD_CFLAGS])
88 AC_SUBST([GTHREAD_LIBS])
90 # --disable-deprecated switch for GTK2 purification
91 AC_ARG_ENABLE([deprecated],
92                 [AS_HELP_STRING([--disable-deprecated], [Disable deprecated GTK functions.])],
93                 [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"],
94                 [])
97 # Check for binary relocation support
98 GEANY_CHECK_BINRELOC
99 # CTags source compatibility (we actually use GRegex instead of POSIX regcomp)
100 AC_DEFINE([HAVE_REGCOMP], [1], [Should always be 1, required for CTags.])
101 # Plugins support
102 GEANY_CHECK_PLUGINS
103 # check for mingw specific settings
104 GEANY_CHECK_MINGW
106 GEANY_CHECK_SOCKET
107 GEANY_CHECK_VTE
108 GEANY_CHECK_MAC_INTEGRATION
109 GEANY_CHECK_THE_FORCE dnl hehe
111 # i18n
112 GEANY_I18N
114 # double eval since datarootdir is usually defined as ${prefix}/share
115 AM_COND_IF([MINGW],
116   [pkgdatadir='${prefix}/data'],
117   [pkgdatadir='${datarootdir}/geany'])
118 AC_SUBST([GEANY_DATA_DIR], [$(eval echo $(eval echo $pkgdatadir))])
119 AC_SUBST([pkgdatadir])
121 # Documentation tools
122 GEANY_CHECK_DOCUTILS
123 GEANY_CHECK_DOXYGEN
125 #FIXME: replace this with a real check that the compiler supports the argument
126 CFLAGS="${CFLAGS} -fvisibility=hidden"
128 # Output
129 AC_CONFIG_FILES([
130                 Makefile
131                 icons/Makefile
132                 icons/16x16/Makefile
133                 icons/24x24/Makefile
134                 icons/32x32/Makefile
135                 icons/48x48/Makefile
136                 icons/scalable/Makefile
137                 icons/tango/Makefile
138                 icons/tango/16x16/Makefile
139                 icons/tango/24x24/Makefile
140                 icons/tango/32x32/Makefile
141                 icons/tango/48x48/Makefile
142                 icons/tango/scalable/Makefile
143                 tagmanager/Makefile
144                 tagmanager/ctags/Makefile
145                 tagmanager/mio/Makefile
146                 tagmanager/src/Makefile
147                 scintilla/Makefile
148                 scintilla/include/Makefile
149                 src/Makefile
150                 plugins/Makefile
151                 po/Makefile.in
152                 data/Makefile
153                 doc/Makefile
154                 doc/geany.1
155                 geany.spec
156                 geany.pc
157                 doc/Doxyfile
158                 tests/Makefile
159                 tests/ctags/Makefile
161 AC_OUTPUT
163 # Summary
164 GEANY_STATUS_OUTPUT
165 echo ""
166 echo "Configuration is done OK."
167 echo ""