2005-11-22 12:26:26 +00:00
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
2005-12-29 20:11:07 +00:00
|
|
|
dnl $Id$
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
AC_INIT(configure.in)
|
2007-05-21 18:38:32 +00:00
|
|
|
AM_INIT_AUTOMAKE(geany, 0.12)
|
2006-07-25 17:45:34 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
AM_CONFIG_HEADER(config.h)
|
|
|
|
|
|
|
|
AC_ISC_POSIX
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_STDC
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
|
|
|
# autoscan start
|
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
2005-12-29 20:11:07 +00:00
|
|
|
AC_CHECK_HEADERS([fcntl.h fnmatch.h glob.h libintl.h limits.h stddef.h stdlib.h string.h sys/time.h unistd.h])
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_HEADER_STAT
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
|
|
|
AC_C_VOLATILE
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_CLOSEDIR_VOID
|
|
|
|
AC_FUNC_ERROR_AT_LINE
|
2006-07-25 17:45:34 +00:00
|
|
|
#AC_REPLACE_FNMATCH
|
2005-11-22 12:26:26 +00:00
|
|
|
AC_FUNC_LSTAT
|
|
|
|
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_MEMCMP
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_STAT
|
|
|
|
AC_FUNC_VPRINTF
|
2006-07-25 17:45:34 +00:00
|
|
|
AC_CHECK_FUNCS([gethostname ftruncate fgetpos getcwd gettimeofday isascii mblen memset mkstemp putenv realpath regcomp setenv strcasecmp strchr strdup strerror strrchr strspn strstr strtol])
|
2005-11-22 12:26:26 +00:00
|
|
|
|
|
|
|
# autoscan end
|
|
|
|
|
2006-05-21 17:51:22 +00:00
|
|
|
|
|
|
|
# get svn revision
|
2007-02-26 15:21:15 +00:00
|
|
|
SVN=`which svn 2>/dev/null`
|
|
|
|
if test -d ".svn" -a "x${SVN}" != "x" -a -x "${SVN}"
|
2006-06-04 18:13:38 +00:00
|
|
|
then
|
|
|
|
REVISION=r`$SVN info|grep 'Last Changed Rev'|cut -d' ' -f4`
|
2007-05-28 15:28:30 +00:00
|
|
|
# force debug mode for a SVN working copy
|
|
|
|
CFLAGS="-g -DGEANY_DEBUG $CFLAGS"
|
2006-06-04 18:13:38 +00:00
|
|
|
else
|
|
|
|
REVISION="-1"
|
|
|
|
fi
|
2006-05-21 17:51:22 +00:00
|
|
|
AC_DEFINE_UNQUOTED([REVISION], "$REVISION", [subversion revision number])
|
|
|
|
|
|
|
|
# GTK checks
|
2005-11-30 22:56:46 +00:00
|
|
|
pkg_modules="gtk+-2.0 >= 2.6.0"
|
2005-11-22 12:26:26 +00:00
|
|
|
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
|
|
|
|
AC_SUBST(PACKAGE_CFLAGS)
|
|
|
|
AC_SUBST(PACKAGE_LIBS)
|
|
|
|
|
2006-08-30 18:36:17 +00:00
|
|
|
# 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])
|
2006-12-11 15:54:45 +00:00
|
|
|
# this should bring in libsocket on Solaris:
|
|
|
|
AC_SEARCH_LIBS([connect],[socket],[],[],[])
|
2006-02-14 22:17:36 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# VTE support
|
2006-05-14 16:07:30 +00:00
|
|
|
AC_ARG_ENABLE(vte, AC_HELP_STRING([--enable-vte],[enable if you want virtual termninal support [[default=yes]]]),
|
|
|
|
[want_vte="$enableval"], [want_vte="yes"])
|
2005-11-27 20:44:06 +00:00
|
|
|
|
2005-12-29 20:11:07 +00:00
|
|
|
# if test "$want_vte" = "yes"; then
|
|
|
|
# PKG_CHECK_MODULES(VTE, [vte],
|
|
|
|
# [AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])],
|
|
|
|
# [AC_MSG_ERROR([VTE support enabled, but VTE not found])])
|
|
|
|
# AC_CHECK_LIB(vte, vte_terminal_new,
|
|
|
|
# [AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])],
|
|
|
|
# [AC_MSG_ERROR([VTE support enabled, but VTE not found])], [])
|
|
|
|
# fi
|
|
|
|
|
2006-07-25 17:45:34 +00:00
|
|
|
# Check for random number paths (skip when cross compiling)
|
|
|
|
if test "x$build" = "x$target"; then
|
|
|
|
AC_CHECK_FILE([/dev/urandom], AC_DEFINE([HAVE_DEVURANDOM], [1], [Define that you found /dev/urandom]))
|
|
|
|
AC_CHECK_FILE([/dev/random], AC_DEFINE([HAVE_DEVRANDOM], [1], [Define that you found /dev/random]))
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$target" = "xi386-mingw32msvc"; then
|
|
|
|
AC_DEFINE_UNQUOTED([WIN32], 1, [we are cross compiling for WIN32])
|
|
|
|
want_vte="no"
|
|
|
|
AC_EXEEXT
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(MINGW, test "x$target" = "xi386-mingw32msvc")
|
|
|
|
|
2005-12-29 20:11:07 +00:00
|
|
|
|
2006-01-16 17:00:39 +00:00
|
|
|
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
|
2005-11-27 20:44:06 +00:00
|
|
|
|
2006-05-14 16:07:30 +00:00
|
|
|
# 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
|
2005-11-22 12:26:26 +00:00
|
|
|
GETTEXT_PACKAGE=geany
|
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
|
|
|
|
|
2007-04-08 16:38:46 +00:00
|
|
|
ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`" # take all languages found in file po/LINGUAS
|
2006-05-14 16:07:30 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AM_GLIB_GNU_GETTEXT
|
|
|
|
|
2006-05-14 16:07:30 +00:00
|
|
|
|
2006-01-16 17:00:39 +00:00
|
|
|
# Set ${datadir}
|
2006-10-01 17:28:45 +00:00
|
|
|
if test "x${datadir}" = 'x${prefix}/share' -o "x${datarootdir}" = 'x${prefix}/share'; then
|
2006-01-16 17:00:39 +00:00
|
|
|
if test "x${prefix}" = "xNONE"; then
|
|
|
|
prefix=${ac_default_prefix}
|
|
|
|
fi
|
|
|
|
fi
|
2006-10-01 17:28:45 +00:00
|
|
|
# check for datarootdir (autoconf >= 2.60), if not set(autoconf < 2.60), define it
|
|
|
|
if test "x${datarootdir}" = "x"; then
|
|
|
|
datarootdir=${datadir}
|
|
|
|
fi
|
2006-01-16 17:00:39 +00:00
|
|
|
|
2006-07-25 17:45:34 +00:00
|
|
|
if test "x$want_vte" = "xyes"; then
|
|
|
|
AC_DEFINE(HAVE_VTE, 1, [Define if you want VTE support])
|
|
|
|
fi
|
|
|
|
|
2006-10-01 17:28:45 +00:00
|
|
|
GEANY_PIXMAPS_DIR=`eval echo ${datarootdir}/pixmaps`
|
2006-01-15 18:44:38 +00:00
|
|
|
AC_SUBST(GEANY_PIXMAPS_DIR)
|
2006-10-01 17:28:45 +00:00
|
|
|
GEANY_DATA_DIR=`eval echo ${datarootdir}/geany`
|
2006-06-08 14:48:39 +00:00
|
|
|
AC_SUBST(GEANY_DATA_DIR)
|
2006-01-15 18:44:38 +00:00
|
|
|
|
2006-07-25 17:45:34 +00:00
|
|
|
|
2005-11-22 12:26:26 +00:00
|
|
|
AC_OUTPUT([
|
|
|
|
Makefile
|
|
|
|
tagmanager/Makefile
|
|
|
|
tagmanager/include/Makefile
|
|
|
|
scintilla/Makefile
|
|
|
|
scintilla/include/Makefile
|
|
|
|
src/Makefile
|
|
|
|
po/Makefile.in
|
|
|
|
doc/Makefile
|
2006-06-08 14:48:39 +00:00
|
|
|
doc/geany.1
|
2005-11-22 12:26:26 +00:00
|
|
|
geany.spec
|
2006-01-15 18:44:38 +00:00
|
|
|
geany.desktop
|
2005-11-22 12:26:26 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
echo "----------------------------------------"
|
2005-11-27 20:44:06 +00:00
|
|
|
echo "Install Geany in : ${prefix}"
|
2006-07-25 17:45:34 +00:00
|
|
|
if test "x${build}" != "x" -a "x${target}" != "x"
|
|
|
|
then
|
|
|
|
echo "Building Geany on : ${build}"
|
|
|
|
echo "Building Geany for : ${target}"
|
|
|
|
fi
|
2006-02-14 22:17:36 +00:00
|
|
|
echo "Using GTK version : ${GTK_VERSION}"
|
2005-11-27 20:44:06 +00:00
|
|
|
echo "Use virtual terminal support : ${want_vte}"
|
2006-08-30 18:36:17 +00:00
|
|
|
echo "Use (UNIX domain) socket support : ${want_socket}"
|
2006-06-04 18:13:38 +00:00
|
|
|
if test "${REVISION}" != "-1"
|
|
|
|
then
|
|
|
|
echo "Compiling Subversion revision : ${REVISION}"
|
|
|
|
fi
|
2006-02-14 22:17:36 +00:00
|
|
|
echo ""
|
2005-11-22 12:26:26 +00:00
|
|
|
echo "Configuration is done OK."
|
|
|
|
echo ""
|