2009-04-30 21:47:19 +02:00
|
|
|
dnl $Id$
|
|
|
|
|
|
|
|
AC_INIT(nautilus-follow-symlink, [1.1])
|
|
|
|
AC_CONFIG_SRCDIR([src/follow-symlink.c])
|
|
|
|
|
|
|
|
dnl Cross-compilation
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_ARG_PROGRAM
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE([1.7 foreign])
|
|
|
|
AC_REVISION(SVN $Rev$)
|
2006-10-24 18:30:45 +02:00
|
|
|
|
|
|
|
AC_CONFIG_HEADER(src/config.h)
|
|
|
|
|
2009-04-30 21:47:19 +02:00
|
|
|
dnl default FLAGS, if none provided (note to self: ':=' is not portable)
|
|
|
|
if test -z "$CPPFLAGS" ; then
|
|
|
|
CPPFLAGS="-pedantic-errors"
|
|
|
|
fi
|
|
|
|
if test -z "$CFLAGS" ; then
|
|
|
|
CFLAGS="-Werror -Winline"
|
|
|
|
fi
|
2006-10-24 18:30:45 +02:00
|
|
|
|
2009-04-30 21:47:19 +02:00
|
|
|
dnl Extra flags always set (might be overridden by user's)
|
|
|
|
dnl CPPFLAGS="$CPPFLAGS"
|
|
|
|
CFLAGS="-O2 -Wall -std=gnu99 $CFLAGS"
|
|
|
|
LDFLAGS="-Wl,--as-needed $LDFLAGS"
|
2006-10-30 06:22:35 +01:00
|
|
|
|
|
|
|
# libtool, DISABLE_STATIC should go before PROG_LIBTOOL
|
2006-10-24 18:30:45 +02:00
|
|
|
AM_DISABLE_STATIC
|
2006-10-30 06:22:35 +01:00
|
|
|
AM_PROG_LIBTOOL
|
2006-10-24 18:30:45 +02:00
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_LANG_C
|
|
|
|
AC_PROG_CC
|
|
|
|
|
2006-10-24 20:30:39 +02:00
|
|
|
# intltool
|
|
|
|
AC_PROG_INTLTOOL(0.18)
|
|
|
|
GETTEXT_PACKAGE=nautilus-follow-symlink
|
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext domain])
|
|
|
|
ALL_LINGUAS="ca es" dnl Implied en
|
2009-04-30 21:47:19 +02:00
|
|
|
#AM_GNU_GETTEXT_VERSION dnl autoreconf only runs autopoint if this is present
|
2006-10-24 20:30:39 +02:00
|
|
|
AM_GLIB_GNU_GETTEXT
|
|
|
|
|
2006-10-24 18:30:45 +02:00
|
|
|
# string.h and stdlib.h are used
|
|
|
|
dnl defines STDC_HEADERS if ANSI-compliant headers are present
|
|
|
|
AC_HEADER_STDC
|
|
|
|
dnl Xref: http://www.seul.org/docs/autotut/#libtool
|
2006-10-25 05:31:25 +02:00
|
|
|
#AC_CHECK_HEADERS(sys/stat.h,,AC_MSG_ERROR([required header file missing]))
|
2006-10-24 18:30:45 +02:00
|
|
|
|
|
|
|
# glib-2.0: ensure it's present
|
|
|
|
dnl and set GLIB_CFLAGS and GLIB_LIBS
|
2008-05-04 16:02:54 +02:00
|
|
|
dnl The newer API in GNOME 2.22 requires 2.16 (maybe 2.14?),
|
|
|
|
dnl gio is the only module required (probably)
|
|
|
|
AM_PATH_GLIB_2_0(2.16.0, [], [], gio)
|
2006-10-24 18:30:45 +02:00
|
|
|
|
|
|
|
# pkg-config: ensure libnautilus-extension is found by pkg-config
|
|
|
|
PKG_CHECK_MODULES(NAUTILUS_EXTENSION, [libnautilus-extension])
|
|
|
|
|
|
|
|
#AC_DEFINE(_GNU_SOURCE)
|
|
|
|
|
|
|
|
dnl Incorporate the result of tests
|
|
|
|
CFLAGS="$CFLAGS $GLIB_CFLAGS $NAUTILUS_EXTENSION_CFLAGS"
|
|
|
|
LIBS="$LIBS $GLIB_LIBS $NAUTILUS_EXTENSION_LIBS"
|
|
|
|
|
2009-04-30 21:47:19 +02:00
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
# Config:
|
|
|
|
#
|
|
|
|
# Flags:
|
|
|
|
# CFLAGS = $CFLAGS
|
|
|
|
# CPPFLAGS = $CPPFLAGS
|
|
|
|
# LDFLAGS = $LDFLAGS
|
|
|
|
# LIBS = $LIBS
|
|
|
|
# LDADD = $LDADD
|
|
|
|
# CC = $CC
|
|
|
|
# CPP = $CPP
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
2006-10-24 20:30:39 +02:00
|
|
|
AC_OUTPUT([Makefile
|
|
|
|
src/Makefile
|
|
|
|
po/Makefile.in
|
2009-04-30 21:47:19 +02:00
|
|
|
nautilus-follow-symlink.spec
|
2006-10-24 20:30:39 +02:00
|
|
|
])
|