Add ChangeLog file.
[gmpc-exiftool.git] / configure.ac
blobcb349a4b2bf1e46bef5b3db184de71943ec3ec52
1 #Define the version
2 m4_define([package_major_version], [0])
3 m4_define([package_minor_version], [0])
4 m4_define([package_micro_version], [7])
5 m4_define([package_version], [package_major_version.package_minor_version.package_micro_version])
7 AC_INIT([gmpc-exiftool], [package_version], [qball@sarine.nl])
10 AC_PREREQ(2.58)
11 # so in metapackage it builds standalone
12 AC_CONFIG_AUX_DIR([.])
13 AC_CONFIG_HEADER([config.h])
14 AM_INIT_AUTOMAKE
15 AM_MAINTAINER_MODE
17 AC_PROG_CC
18 AC_PROG_CC_C_O
19 AC_PROG_LIBTOOL
21 #intltool, libtool. Check for CC compiler
22 #AC_PROG_INTLTOOL([0.21])
23 #ALL_LINGUAS=""
24 #AM_GNU_GETTEXT_VERSION(0.11.5)
25 #AM_GLIB_GNU_GETTEXT
26 #GETTEXT_PACKAGE=gmpc-exiftool
27 #AC_SUBST(GETTEXT_PACKAGE)
28 #AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GETTEXT Package name])
29 #AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/${DATADIRNAME}/locale", [Name of gettext locale directory])
33 AM_PROG_VALAC([0.7.0])
35 PKG_PROG_PKG_CONFIG
36 enable_perl=yes
38 if test "$enable_perl" = yes ; then
39         sedpath=`which sed`
40         AC_PATH_PROG(perlpath, perl)
41         AC_MSG_CHECKING(for Perl compile flags)
42         PERL_CFLAGS=`$perlpath -MExtUtils::Embed -e ccopts 2>/dev/null`
43         if test "_$PERL_CFLAGS" = _ ; then
44                 AC_MSG_RESULT([not found, building without perl.])
45                 enable_perl = no
46         else
47                 PERL_LIBS=`$perlpath -MExtUtils::Embed -e ldopts 2>/dev/null |$sedpath 's/-lgdbm //'`
48                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-ldb //'`
49                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lndbm //'`
50                 if test "$system" = "Linux"; then
51                         PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lnsl //'`
52                         PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lposix //'`
53                 fi
54                 PERL_LIBS=`echo $PERL_LIBS |$sedpath 's/-lc //'`
55                 AC_MSG_RESULT(ok)
57                 oldLIBS="$LIBS"
58                 LIBS="$LIBS $PERL_LIBS"
59                 AC_MSG_CHECKING(for libperl)
60                 AC_CHECK_FUNCS(perl_run, [], enable_perl=no)
61                 LIBS="$oldLIBS"
63                 oldCPPFLAGS="$CPPFLAGS"
64                 CPPFLAGS="$CPPFLAGS $PERL_CFLAGS"
65                 AC_CHECK_HEADERS(EXTERN.h)
66                 AC_CHECK_HEADERS(perl.h, [], enable_perl=no,
67                 [#if HAVE_EXTERN_H
68                  # include <EXTERN.h>
69                  #endif])
70                 CPPFLAGS="$oldCPPFLAGS"
71         fi
73 echo $PERL_LIBS
74 echo $PERL_CFLAGS
75 AC_SUBST(PERL_LIBS)
76 AC_SUBST(PERL_CFLAGS)
78 PKG_CHECK_MODULES([modules],[
79         gtk+-2.0  >= 2.12
80         glib-2.0  >= 2.16
81         libmpd
82         gmpc >= 0.19.1
83         ])
85 AC_OUTPUT([
86         Makefile