summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYaakov Selkowitz <[email protected]>2013-04-05 02:17:49 -0500
committerYaakov Selkowitz <[email protected]>2013-04-05 02:17:49 -0500
commit023b6482cdd9867575c0f83b757c15febeb5f2ed (patch)
treef205c4b20bda85ccbb90986f0d390fdc9d548435 /configure.ac
parent6061c5529aae34df9b7baab65d528b383e816738 (diff)
downloadpython-caja-023b6482cdd9867575c0f83b757c15febeb5f2ed.tar.bz2
python-caja-023b6482cdd9867575c0f83b757c15febeb5f2ed.tar.xz
Fix autotools deprecations
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac108
1 files changed, 108 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..94ae4b3
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,108 @@
+AC_INIT
+
+PACKAGE=caja-python
+VERSION=1.6.0
+
+AC_SUBST(PACKAGE)
+AC_SUBST(VERSION)
+
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_CONFIG_HEADERS(config.h)
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I .")
+
+CAJA_REQUIRED=1.6.0
+
+AC_PROG_CC
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
+dnl Check for pkgconfig first
+AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+dnl Check for gtk-doc
+GTK_DOC_CHECK(1.9)
+
+dnl Give error and exit if we dont have pkgconfig
+if test "x$HAVE_PKGCONFIG" = "xno"; then
+ AC_MSG_ERROR(you need to have pkgconfig installed !)
+fi
+
+AC_PREFIX_DEFAULT([$(pkg-config --variable=prefix libcaja-extension || echo /usr)])
+
+dnl **************************************************
+dnl * Check for Python
+dnl **************************************************
+AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
+AM_CHECK_PYTHON_LIBS(,[AC_MSG_ERROR(could not find Python lib)])
+
+if test "`pkg-config --variable=datadir pygobject-3.0`" != "" ; then
+ PYGOBJECT_VERSION=pygobject-3.0
+ PYGOBJECT_MAJOR_VERSION=3
+ PYGOBJECT_MINOR_VERSION=0
+ PYGOBJECT_MICRO_VERSION=0
+else
+ PYGOBJECT_VERSION=pygobject-2.0
+ PYGOBJECT_MAJOR_VERSION=2
+ PYGOBJECT_MINOR_VERSION=28
+ PYGOBJECT_MICRO_VERSION=2
+fi
+
+PYGOBJECT_REQUIRED=$PYGOBJECT_MAJOR_VERSION.$PYGOBJECT_MINOR_VERSION.$PYGOBJECT_MICRO_VERSION
+AC_DEFINE_UNQUOTED(PYGOBJECT_MAJOR_VERSION,[$PYGOBJECT_MAJOR_VERSION], [PyGObject major version.])
+AC_DEFINE_UNQUOTED(PYGOBJECT_MINOR_VERSION,[$PYGOBJECT_MINOR_VERSION], [PyGObject minor version.])
+AC_DEFINE_UNQUOTED(PYGOBJECT_MICRO_VERSION,[$PYGOBJECT_MICRO_VERSION], [PyGObject micro version.])
+
+PKG_CHECK_MODULES(CAJA_PYTHON, [$PYGOBJECT_VERSION >= $PYGOBJECT_REQUIRED
+ libcaja-extension >= $CAJA_REQUIRED])
+
+PYGOBJECT_DATADIR=`$PKG_CONFIG --variable=datadir $PYGOBJECT_VERSION`
+AC_SUBST(PYGOBJECT_DATADIR)
+
+PYGOBJECT_PYGDOCS="`$PKG_CONFIG --variable=pygdocs $PYGOBJECT_VERSION`"
+AC_SUBST(PYGOBJECT_PYGDOCS)
+
+PYGOBJECT_FIXXREF="$PYTHON `$PKG_CONFIG --variable=fixxref $PYGOBJECT_VERSION`"
+AC_SUBST(PYGOBJECT_FIXXREF)
+
+CAJA_LIBDIR=`$PKG_CONFIG --variable=libdir libcaja-extension`
+AC_SUBST(CAJA_LIBDIR)
+AC_DEFINE_UNQUOTED(CAJA_LIBDIR, "$CAJA_LIBDIR", [Caja libdir])
+
+dnl ---------------------------------
+dnl Get caja extensions directory
+dnl ---------------------------------
+CAJA_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libcaja-extension`
+AC_SUBST(CAJA_EXTENSION_DIR)
+AC_DEFINE_UNQUOTED(CAJA_EXTENSION_DIR, "$CAJA_EXTENSION_DIR", [Caja extensions directory])
+
+dnl ---------------------------------
+dnl Check for gtk-doc dependencies
+dnl ---------------------------------
+if test "${enable_gtk_doc}" != no; then
+ dnl Check for xsltproc
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test -z "$XSLTPROC"; then
+ echo " disabling generation of docs"
+ enable_gtk_doc=no
+ fi
+fi
+
+AC_OUTPUT([
+ Makefile
+ examples/Makefile
+ src/Makefile
+ caja-python.pc
+ docs/Makefile
+ docs/reference/entities.docbook
+])
+
+echo
+echo " caja-python $VERSION"
+echo
+echo " Caja Prefix: ${prefix}"
+echo " PyGObject Version: ${PYGOBJECT_VERSION}"
+echo " Documentation: ${enable_gtk_doc}"
+echo