1 dnl Process this file with autoconf to produce a configure script.
3 AC_CONFIG_HEADER(config.h)
5 dnl Checks for programs.
8 dnl Use -Wall if possible
10 if test "x$GCC" = "xyes"; then
12 *[\ \ ]-Wall[\ \ ]*) ;;
13 *) CFLAGS="$CFLAGS -Wall" ;;
18 dnl Find GLib (needed for future tests)
19 AC_MSG_CHECKING(for GLib library)
20 GLIB_LIBS=`glib-config --libs`
22 if [ -n "$GLIB_LIBS" ]; then
23 AC_MSG_RESULT(yes - use '$GLIB_LIBS')
25 AC_MSG_ERROR(can't run 'glib-config --libs' - make sure it is in your PATH)
30 AC_MSG_CHECKING(for ImLib library)
31 IMLIB_LIBS=`imlib-config --libs-gdk 2> /dev/null`
33 if [ -n "$IMLIB_LIBS" ]; then
35 AC_MSG_RESULT(yes - use '$IMLIB_LIBS')
37 IMLIB_CFLAGS=`imlib-config --cflags-gdk`
39 AC_MSG_RESULT(no - 'imlib-config --libs-gdk' failed)
42 AC_SUBST(IMLIB_CFLAGS)
45 dnl Does file(1) support '-b' ?
46 AC_MSG_CHECKING(whether file -b works)
47 if file -b / > /dev/null 2> /dev/null
49 AC_DEFINE(FILE_B_FLAG)
55 dnl Checks for header files.
60 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h mntent.h sys/ucred.h sys/mntent.h)
61 AC_CHECK_HEADERS(vfs.h locale.h)
63 dnl Checks for typedefs, structures, and compiler characteristics.
68 dnl Checks for library functions.
69 AC_CHECK_FUNCS(gethostname mkdir rmdir strdup strtol getopt_long)
71 dnl Check for the Midnight Commander VFS library
72 AC_CHECK_LIB(vfs, mc_stat, , , $GLIB_LIBS)