[b5c97e]: configure.ac Maximize Restore History

Download this file

configure.ac    204 lines (148 with data), 5.4 kB

dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.5)

dnl Name your plug-in here
m4_define([plugin_name], [PanoPlugin])

dnl These three define the plug-in version number
m4_define([plugin_major_version], [0])
m4_define([plugin_minor_version], [1])
m4_define([plugin_micro_version], [0])

m4_define([plugin_version],
          [plugin_major_version.plugin_minor_version.plugin_micro_version])

AC_INIT([plugin_name], [plugin_version], [dwilkins42@users.sourceforge.net])

AC_DEFINE(PLUGIN_NAME, PACKAGE_NAME, [Plug-In name])
AC_DEFINE(PLUGIN_VERSION, PACKAGE_VERSION, [Plug-In version])

AC_DEFINE(PLUGIN_MAJOR_VERSION, plugin_major_version, [Plug-In major version])
AC_DEFINE(PLUGIN_MINOR_VERSION, plugin_minor_version, [Plug-In minor version])
AC_DEFINE(PLUGIN_MICRO_VERSION, plugin_micro_version, [Plug-In micro version])

AC_CONFIG_SRCDIR([src/Gimpmain.c])
AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE([no-define dist-bzip2 dist-zip])

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC


ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

AM_MAINTAINER_MODE

dnl debugging options
AH_TEMPLATE([DEBUG],[Enable debug macros])
AC_ARG_ENABLE([debug],
              AC_HELP_STRING([--enable-debug],
                             [enable debugging of the GIMP plugin (default=no).]),
              [AC_DEFINE(DEBUG)],enable_debug=no)

dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
fi
changequote([,])dnl


GIMP_REQUIRED_VERSION=2.0.0

PKG_CHECK_MODULES(GIMP,
  gimp-2.0 >= $GIMP_REQUIRED_VERSION gimpui-2.0 >= $GIMP_REQUIRED_VERSION)

AC_SUBST(GIMP_CFLAGS)
AC_SUBST(GIMP_LIBS)

GIMP_LIBDIR=`$PKG_CONFIG --variable=gimplibdir gimp-2.0`
AC_SUBST(GIMP_LIBDIR)

if `$PKG_CONFIG gimp-2.0 --max-version=2.0.6`; then
  AC_DEFINE_UNQUOTED(GIMP_2_0, 1, ["defined if GIMP version is less than or equal to 2.0.6"])
fi

dnl i18n stuff

GETTEXT_PACKAGE=PanoPlugin
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
				    [The gettext translation domain.])

dnl Add the languages which your application supports here.
dnl for testing, uncomment this
dnl ALL_LINGUAS="de fr pl"

dnl Until I18N is complete, use this
ALL_LINGUAS=""

AC_PROG_INTLTOOL
AM_GLIB_GNU_GETTEXT

AC_CHECK_FUNCS(bind_textdomain_codeset)

LOCALEDIR='${datadir}/locale'
DATADIR='${datadir}/plugin_name'

AC_SUBST(LOCALEDIR)
AC_SUBST(DATADIR)

AC_SUBST(ALL_LINGUAS)

dnl  The build of the HTML files is optional

AC_ARG_ENABLE(build,
              AC_HELP_STRING([--enable-build],
                             [build the help files from XML (needs xsltproc)(default=no).])
			  ,, enable_build=no)

AM_CONDITIONAL(GIMP_HELP_BUILD, test "x$enable_build" = "xyes")

dnl Using convert for optimizing screenshots for the html version is
dnl optional

AC_ARG_ENABLE(convert,
              AC_HELP_STRING([--enable-convert],
                             [optimize the PNGs for the Web in file size (needs convert)(default=no).])
			  ,, enable_convert=no)

AM_CONDITIONAL(USE_CONVERT, test "x$enable_convert" = "xyes")

dnl  Search the XSLT processor

if test "x$enable_build" = "xyes"; then
AC_PATH_PROG(XSLTPROC, xsltproc)
if test -z "$XSLTPROC"; then
  AC_MSG_ERROR([
** Couldn't find xsltproc. You will need it to build the help files.
** If you want to install the prebuilt help files only, use --disable-build.
** See the file 'INSTALL' for more help.])
fi
fi

dnl  Search for xmllint

if test "x$enable_build" = "xyes"; then
AC_PATH_PROG(XMLLINT, xmllint)
if test -z "$XMLLINT" && test "x$enable_build" = "xyes"; then
  AC_MSG_WARN([Couldn't find xmllint, won't be able to validate the XML.])
fi
fi

dnl Search for image magic convert

if test "x$enable_convert" = "xyes"; then
AC_PATH_PROG(CONVERT, convert)
if test -z "$CONVERT" && test "x$enable_convert" = "xyes"; then
  AC_MSG_ERROR([
** Coudn't find convert. You will need it to optimize the images for the
** web.])
fi
fi

dnl  Optionally allow xsltproc to access DTDs over the network

if test "x$enable_build" = "xyes"; then
AC_ARG_ENABLE(network,
              [  --enable-network        allow to fetch DTDs or entities over the network])

if test "x$enable_network" != "xyes"; then
  XSLTFLAGS='--nonet'
fi

AC_SUBST(XSLTFLAGS)
fi

dnl  Default to the correct way of identifying stylesheets.
dnl  People need an XML catalog to resolve this to a local file.

STYLEBASE='http://docbook.sourceforge.net/release/xsl/current'

dnl  Allow to explicitely specify the stylesheet location
dnl  in case the XML catalog doesn't exist or is broken.

if test "x$enable_build" = "xyes"; then
AC_ARG_WITH(xsl,
            [  --with-xsl=<basedir>    path to the base of the DocBook Modular Stylesheets])

if test "x$with_xsl" != "x"; then
  STYLEBASE=$with_xsl
  AC_CHECK_FILE($STYLEBASE/xhtml/docbook.xsl,,
    AC_MSG_ERROR([** Couldn't find docbook.xsl in $STYLEBASE/xhtml]))
fi
fi

AC_SUBST(STYLEBASE)

AC_CONFIG_FILES([
Makefile
src/Makefile
po/Makefile.in
help/Makefile
help/stylesheets/plainhtml.xsl
help/stylesheets/plainprint.xsl
help/stylesheets/profile.xsl
])

AC_OUTPUT

AC_MSG_RESULT([
 Prefix                          $prefix
 Debug enabled:                  $enable_debug
 Languages:                      en $ALL_LINGUAS
 Rebuild the help files:         $enable_build
 Optimize PNGs for HTML files:   $enable_convert 
])