1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_HEADER(config.h)
6 [ --with-platform platform name, as detected by AppRun],
7 [AC_SUBST(with_platform)],
11 Please do not run 'configure' manually - instead, run the AppRun script with
12 the --compile option, like this:
13 $ ROX-Filer/AppRun --compile
19 if test -z "$PKG_CONFIG"; then
24 AC_MSG_CHECKING(that pkg-config runs)
25 if "$PKG_CONFIG" --version > /dev/null 2>&1 ; then
29 AC_MSG_ERROR([*** $PKG_CONFIG missing ***
31 \'$PKG_CONFIG --version\' failed to run - make sure it is inside one of the
32 directories in your PATH environment variable!
34 pkg-config comes with the developement packages for GTK+-2.0, available at:
39 AC_DEFUN(ROX_REQUIRE, [
40 AC_MSG_CHECKING(that $1 (version >= $2) is installed)
41 if "$PKG_CONFIG" --atleast-version=$2 $1 ; then
45 if "$PKG_CONFIG" --exists $1 ; then
46 AC_MSG_ERROR(Current version is only `"$PKG_CONFIG" "$1" --modversion`)
48 AC_MSG_ERROR(Package is not installed)
53 ROX_REQUIRE(gtk+-2.0, 2.0.1)
54 ROX_REQUIRE(glib-2.0, 2.0.3)
55 ROX_REQUIRE(libxml-2.0, 2.0.0)
57 dnl Checks for programs.
60 dnl Use -Wall, etc if possible
62 if test "x$GCC" = "xyes"; then
64 *[\ \ ]-Wall[\ \ ]*) ;;
65 *) CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -Wmissing-prototypes" ;;
70 dnl Find the X libraries
72 if test x$no_x = xyes ; then
73 AC_MSG_ERROR([X development libraries not found])
75 LIBS="$LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
76 CFLAGS="$CFLAGS $X_CFLAGS"
78 dnl Does file(1) support '-b' ?
79 AC_MSG_CHECKING(whether file -b works)
80 if file -b / > /dev/null 2> /dev/null
82 AC_DEFINE(FILE_B_FLAG)
88 AC_MSG_CHECKING(for large file support)
89 if getconf LFS64_CFLAGS > /dev/null 2> /dev/null; then
91 LFS_CFLAGS="`getconf LFS_CFLAGS`"
92 LFS_LDFLAGS="`getconf LFS_LDFLAGS`"
93 LFS_LIBS="`getconf LFS_LIBS`"
94 AC_DEFINE(LARGE_FILE_SUPPORT)
102 AC_SUBST(LFS_LDFLAGS)
105 dnl Checks for header files.
110 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h mntent.h sys/ucred.h sys/mntent.h)
112 dnl Checks for typedefs, structures, and compiler characteristics.
117 dnl Checks for library functions.
118 AC_CHECK_FUNCS(gethostname unsetenv mkdir rmdir strdup strtol getopt_long)
120 dnl Extract version info from AppInfo.xml
121 AC_MSG_CHECKING(extracting version information)
123 VERSION=`sed -n 's/^.*<Version>\([.0-9]*\).*<\/Version>.*$/\1/p' ../AppInfo.xml`
125 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
126 AC_MSG_RESULT(version $VERSION)