~mhall119/+junk/geany-keywords

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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
dnl Process this file with autoconf to produce a configure script.
dnl $Id: configure.in 3504 2009-01-22 20:33:21Z eht16 $

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(geany, 0.16)

AM_CONFIG_HEADER(config.h)

AC_GNU_SOURCE
AC_AIX
AC_MINIX

AC_PROG_CC

AC_PROG_CXX
# check for C++ compiler explicitly and fail if none is found, do this check
# after AC_PROG_CXX has set the CXX environment variable
which $CXX >/dev/null 2>&1
if test "x$?" != "x0"; then
	AC_MSG_ERROR([No C++ compiler not found. Please install a C++ compiler.])
fi

#AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_INTLTOOL

# for plugins
AC_DISABLE_STATIC
AM_PROG_LIBTOOL
LIBTOOL="$LIBTOOL --silent"

# autoscan start

# Checks for header files.
AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h regex.h stdlib.h sys/time.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_STRUCT_TM

# Checks for library functions.
AC_CHECK_FUNCS([gethostname ftruncate fgetpos mkstemp regcomp strerror strstr])

# autoscan end


# get svn revision (try GIT first, then check for SVN)
REVISION="r0"
GIT=`which git 2>/dev/null`
if test -d ".git" -a "x${GIT}" != "x" -a -x "${GIT}"
then
	REVISION=r`git svn find-rev origin/trunk 2>/dev/null ||
				git svn find-rev trunk 2>/dev/null || git svn find-rev HEAD 2>/dev/null ||
				git svn find-rev master 2>/dev/null || echo 0`
fi
if test "x${REVISION}" = "xr0"
then
	SVN=`which svn 2>/dev/null`
	if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}"
	then
		REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
	fi
fi
if test "x${REVISION}" != "xr0"
then
	# force debug mode for a SVN working copy
	CFLAGS="-g -DGEANY_DEBUG $CFLAGS"
else
	REVISION="-1"
fi
AC_DEFINE_UNQUOTED([REVISION], "$REVISION", [subversion revision number])


dnl Check for binary relocation support
dnl taken from Inkscape (Hongli Lai <h.lai@chello.nl>)

AC_ARG_ENABLE(binreloc,
       [  --enable-binreloc       compile with binary relocation support],
       enable_binreloc=$enableval,enable_binreloc=no)

AC_MSG_CHECKING(whether binary relocation support should be enabled)
if test "$enable_binreloc" = "yes"; then
       AC_MSG_RESULT(yes)
       AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
       if test -e /proc/self/maps; then
               AC_MSG_RESULT(yes)
       else
               AC_MSG_RESULT(no)
               AC_MSG_ERROR(/proc/self/maps is not available. Binary relocation cannot be enabled.)
               enable_binreloc="no"
       fi

elif test "$enable_binreloc" = "auto"; then
       AC_MSG_RESULT(yes when available)
       AC_MSG_CHECKING(for linker mappings at /proc/self/maps)
       if test -e /proc/self/maps; then
               AC_MSG_RESULT(yes)
               enable_binreloc=yes

               AC_MSG_CHECKING(whether everything is installed to the same prefix)
               if test "$bindir" = '${exec_prefix}/bin' -a "$sbindir" = '${exec_prefix}/sbin' -a \
                       "$datadir" = '${prefix}/share' -a "$libdir" = '${exec_prefix}/lib' -a \
                       "$libexecdir" = '${exec_prefix}/libexec' -a "$sysconfdir" = '${prefix}/etc'
               then
                       AC_MSG_RESULT(yes)
               else
                       AC_MSG_RESULT(no)
                       AC_MSG_NOTICE(Binary relocation support will be disabled.)
                       enable_binreloc=no
               fi

       else
               AC_MSG_RESULT(no)
               enable_binreloc=no
       fi

elif test "$enable_binreloc" = "no"; then
       AC_MSG_RESULT(no)
else
       AC_MSG_RESULT(no (unknown value "$enable_binreloc"))
       enable_binreloc=no
fi
if test "$enable_binreloc" = "yes"; then
   AC_DEFINE(ENABLE_BINRELOC,,[Use AutoPackage?])
fi


# GTK checks
gtk_modules="gtk+-2.0 >= 2.8.0"
PKG_CHECK_MODULES(GTK, [$gtk_modules])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
# GIO checks
gio_modules="gio-2.0 >= 2.16"
PKG_CHECK_MODULES(GIO, [$gio_modules], have_gio=1, have_gio=0)
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
if test $have_gio = 1 ; then
    AC_DEFINE(HAVE_GIO, 1, [Whether GIO is available])
fi

# --disable-deprecated switch for GTK2 purification
AC_ARG_ENABLE(deprecated, [  --disable-deprecated    Disable deprecated GTK functions. ],
			  [GTK_CFLAGS="$GTK_CFLAGS -DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"], [])

# Plugins support
AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support  [default=no]])], , enable_plugins=yes)

if test "x$enable_plugins" = "xyes" ; then
	AC_DEFINE(HAVE_PLUGINS, 1, [Define if plugins are enabled.])
	AM_CONDITIONAL(PLUGINS, true)
else
	AM_CONDITIONAL(PLUGINS, false)
fi

# Use included GNU regex library
AC_ARG_ENABLE(gnu-regex, [AC_HELP_STRING([--enable-gnu-regex], [compile with included GNU regex library  [default=no]])], , enable_gnu_regex=no)

if test "x$enable_gnu_regex" = "xyes" ; then
	AC_DEFINE(USE_INCLUDED_REGEX, 1, [Define if included GNU regex code should be used.])
	AC_DEFINE(HAVE_REGCOMP, 1, [Define if you have the 'regcomp' function.])
	AM_CONDITIONAL(USE_INCLUDED_REGEX, true)
else
	AM_CONDITIONAL(USE_INCLUDED_REGEX, false)
fi

case "${host}" in
    *mingw*)
	AC_CHECK_LIB(iberty, fnmatch, [], [
		AC_MSG_ERROR([fnmatch does not present in libiberty. You need to update it, read http://www.geany.org/Support/CrossCompile for details.])
		])
	AC_DEFINE_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
	want_vte="no"
	want_socket="no"
	AC_EXEEXT
	AM_CONDITIONAL(MINGW, true)
	;;
    *)
        AM_CONDITIONAL(MINGW, false)
	;;
esac

dnl skip check if already decided
if test "x$want_socket" = "x"; then
    # socket support
    AC_ARG_ENABLE(socket, AC_HELP_STRING([--enable-socket],[enable if you want to detect a running instance [[default=yes]]]),
     [want_socket="$enableval"], [want_socket="yes"])

    if test "x$want_socket" = "xyes"; then
    	AC_DEFINE(HAVE_SOCKET, 1, [Define if you want to detect a running instance])
	# this should bring in libsocket on Solaris:
	AC_SEARCH_LIBS([connect],[socket],[],[],[])
    fi
fi

dnl skip check if already decided
if test "x$want_vte" = "x"; then
    # VTE support
    AC_ARG_ENABLE(vte, AC_HELP_STRING([--enable-vte],
     [enable if you want virtual terminal support [[default=yes]]]),
     [want_vte="$enableval"], [want_vte="yes"])
    if test "x$want_vte" = "xyes"; then
    	AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])
    fi
    AC_ARG_WITH(vte-module-path, AC_HELP_STRING([--with-vte-module-path=PATH],
     [Path to a loadable libvte [[default=None]]]), [AC_DEFINE_UNQUOTED([VTE_MODULE_PATH],
     ["$withval"], [Path to a loadable libvte])])
fi

GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`


# GTK 2.10 printing support
$PKG_CONFIG --exists 'gtk+-2.0 >= 2.10.0'
if test "x$?" = "x0" ; then
	enable_printing="yes"
else
	enable_printing="no (GTK >= 2.10 necessary)"
fi


# just for a laugh (it has absolutely no effect)
AC_ARG_ENABLE(the-force, AC_HELP_STRING([--enable-the-force],
     [enable if you are Luke Skywalker and the force is with you [[default=no]]]), [be_luke="$enableval"], [be_luke="no"])
AC_MSG_CHECKING([whether the force is with you])
if test "x$be_luke" = "xyes"; then
	AC_MSG_RESULT([yes])
else
	AC_MSG_RESULT([no])
fi

# i18n
GETTEXT_PACKAGE=geany
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])

ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`" # take all languages found in file po/LINGUAS

AM_GLIB_GNU_GETTEXT
# workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
if test "x$MSGFMT" = "xno"; then
	AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
fi


# Set ${datadir}
if test "x${datadir}" = 'x${prefix}/share' -o "x${datarootdir}" = 'x${prefix}/share'; then
	if test "x${prefix}" = "xNONE"; then
		prefix=${ac_default_prefix}
	fi
fi

# Set ${docdir} if it is empty
if test -z "${docdir}"; then
	docdir='${datadir}/doc/${PACKAGE}'
	AC_SUBST(docdir)
fi

GEANY_PIXMAPS_DIR=`eval echo ${datarootdir}/pixmaps`
AC_SUBST(GEANY_PIXMAPS_DIR)
GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`
AC_SUBST(GEANY_DATA_DIR)

# intltool hack to define install_sh on Debian/Ubuntu systems
if test "x$install_sh" = "x"; then
	install_sh="`pwd`/install-sh"
	AC_SUBST(install_sh)
fi

AC_OUTPUT([
Makefile
icons/Makefile
icons/16x16/Makefile
tagmanager/Makefile
tagmanager/include/Makefile
scintilla/Makefile
scintilla/include/Makefile
src/Makefile
plugins/Makefile
po/Makefile.in
doc/Makefile
doc/geany.1
geany.spec
geany.pc
doc/Doxyfile
])

echo "----------------------------------------"
echo "Install Geany in                   : ${prefix}"
if test "x${build}" != "x" -a "x${target}" != "x"
then
	echo "Building Geany on                  : ${build}"
	echo "Building Geany for                 : ${target}"
fi
echo "Using GTK version                  : ${GTK_VERSION}"
echo "Build with GTK printing support    : ${enable_printing}"
echo "Build with plugin support          : ${enable_plugins}"
echo "Use virtual terminal support       : ${want_vte}"
echo "Use (UNIX domain) socket support   : ${want_socket}"
if test "${REVISION}" != "-1"
then
	echo "Compiling Subversion revision      : ${REVISION}"
fi
echo ""
echo "Configuration is done OK."
echo ""