r259: Added 'dist' target to create the .gmo files automatically.
[rox-filer.git] / ROX-Filer / src / configure.in
blobd05599bb34791e9adaa432fe548f433114076932
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(main.c)
3 AC_CONFIG_HEADER(config.h)
5 dnl Checks for programs.
6 AC_PROG_CC
8 dnl Use -Wall if possible
9 changequote(,)dnl
10 if test "x$GCC" = "xyes"; then
11   case " $CFLAGS " in
12   *[\ \ ]-Wall[\ \      ]*) ;;
13   *) CFLAGS="$CFLAGS -Wall" ;;
14   esac
16 changequote([,])dnl
18 dnl Find GLib (needed for future tests)
19 AC_MSG_CHECKING(for GLib library)
20 GLIB_LIBS=`glib-config --libs`
21 changequote(,)dnl
22 if [ -n "$GLIB_LIBS" ]; then
23   AC_MSG_RESULT(yes - use '$GLIB_LIBS')
24 else
25   AC_MSG_ERROR(can't run 'glib-config --libs' - make sure it is in your PATH)
27 changequote([,])dnl
29 dnl Find ImLib
30 AC_MSG_CHECKING(for ImLib library)
31 IMLIB_LIBS=`imlib-config --libs-gdk 2> /dev/null`
32 changequote(,)dnl
33 if [ -n "$IMLIB_LIBS" ]; then
34 changequote([,])dnl
35   AC_MSG_RESULT(yes - use '$IMLIB_LIBS')
36   AC_DEFINE(HAVE_IMLIB)
37   IMLIB_CFLAGS=`imlib-config --cflags-gdk`
38 else
39   AC_MSG_RESULT(no - 'imlib-config --libs-gdk' failed)
40   IMLIB_CFLAGS=""
42 AC_SUBST(IMLIB_CFLAGS)
43 AC_SUBST(IMLIB_LIBS)
45 dnl Does file(1) support '-b' ?
46 AC_MSG_CHECKING(whether file -b works)
47 if file -b / > /dev/null 2> /dev/null
48 then
49   AC_DEFINE(FILE_B_FLAG)
50   AC_MSG_RESULT(yes)
51 else
52   AC_MSG_RESULT(no)
55 dnl Checks for header files.
56 AC_PATH_X
57 AC_HEADER_DIRENT
58 AC_HEADER_STDC
59 AC_HEADER_SYS_WAIT
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.
64 AC_C_CONST
65 AC_TYPE_UID_T
66 AC_TYPE_SIZE_T
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)
74 AC_OUTPUT(Makefile)