Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (72 sloc) 2.26 KB
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.63])
AC_INIT([libfm], [0.1], [http://libfm.sf.net/])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_HEADERS([config.h])
# Checks for programs.
AC_PROG_CC
AM_PROG_LIBTOOL
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
# Large file support
AC_ARG_ENABLE([largefile],
AS_HELP_STRING([--enable-largefile],
[enable Large file support (default: yes)]),
largefile=$enableval, largefile="yes")
if test x"$largefile" = x"yes"; then
CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64"
AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
fi
# intltool
IT_PROG_INTLTOOL([0.40.0])
pkg_modules="gtk+-2.0 >= 2.16.0"
PKG_CHECK_MODULES(GTK, [$pkg_modules])
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
gio_modules="gthread-2.0 gio-unix-2.0 glib-2.0 >= 2.18.0"
PKG_CHECK_MODULES(GIO, [$gio_modules])
AC_SUBST(GIO_CFLAGS)
AC_SUBST(GIO_LIBS)
gmodule_modules="gmodule-2.0"
PKG_CHECK_MODULES(GMODULE, [$gmodule_modules])
AC_SUBST(GMODULE_CFLAGS)
AC_SUBST(GMODULE_LIBS)
menu_modules="libmenu-cache"
PKG_CHECK_MODULES(MENU_CACHE, [$menu_modules])
AC_SUBST(MENU_CACHE_CFLAGS)
AC_SUBST(MENU_CACHE_LIBS)
AC_ARG_ENABLE(demo,
[AC_HELP_STRING([--enable-demo],
[build libfm-demo file manager @<:@default=no@:>@])],
[enable_demo="${enableval}"],
[enable_demo=no]
)
AM_CONDITIONAL(ENABLE_DEMO, test x"$enable_demo" = x"yes")
GETTEXT_PACKAGE=libfm
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
AC_CONFIG_FILES([
Makefile
src/Makefile
data/Makefile
data/ui/Makefile
po/Makefile.in
libfm.pc
])
AC_CONFIG_FILES([data/gnome-terminal], [chmod +x data/gnome-terminal])
AC_OUTPUT
if test x"$sysconfdir" != x'/etc'; then
echo
echo
echo 'Error: sysconfdir is not /etc.'
echo 'Please consider passing --sysconfdir=/etc to configure.';
echo 'Otherwise default config files will be installed to wrong place.'
echo
echo
fi