~ubuntu-branches/ubuntu/wily/exif/wily

« back to all changes in this revision

Viewing changes to configure.in

  • Committer: Bazaar Package Importer
  • Author(s): christophe barbe
  • Date: 2004-06-18 14:44:26 UTC
  • Revision ID: james.westby@ubuntu.com-20040618144426-36li8gkxq3f3kau3
Tags: upstream-0.6.9
ImportĀ upstreamĀ versionĀ 0.6.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_PREREQ(2.50)
 
2
AC_INIT(exif/main.c)
 
3
AM_CONFIG_HEADER(config.h)
 
4
AM_INIT_AUTOMAKE(exif,0.6.9)
 
5
AM_MAINTAINER_MODE
 
6
 
 
7
AM_PROG_LIBTOOL
 
8
AC_PATH_PROG(PKG_CONFIG,pkg-config)
 
9
 
 
10
dnl ---------------------------------------------------------------------------
 
11
dnl i18n support
 
12
dnl ---------------------------------------------------------------------------
 
13
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The gettext domain we're
 
14
using])
 
15
ALL_LINGUAS="de es fr"
 
16
AM_GNU_GETTEXT([external])
 
17
 
 
18
dnl ---------------------------------------------------------------------------
 
19
dnl libraries needed
 
20
dnl ---------------------------------------------------------------------------
 
21
PKG_CHECK_MODULES(LIBEXIF, libexif >= 0.6.9)
 
22
AC_SUBST(LIBEXIF_LIBS)
 
23
AC_SUBST(LIBEXIF_CFLAGS)
 
24
 
 
25
dnl ---------------------------------------------------------------------------
 
26
dnl locale.h: locale.h provides setlocale. It seems that some systems don't
 
27
dnl           have it (at least if configured --without-nls).
 
28
dnl ---------------------------------------------------------------------------
 
29
AC_CHECK_HEADERS(locale.h)
 
30
 
 
31
dnl ---------------------------------------------------------------------------
 
32
dnl popt.h: Simplifies handling of command-line options enormously.
 
33
dnl ---------------------------------------------------------------------------
 
34
popt_msg="no (Note that popt is mandatory, so exif won't compile)"
 
35
try_popt=true
 
36
have_popt=false
 
37
AC_ARG_WITH(popt, [  --without-popt            Don't use popt.h],
 
38
        if test "x${withval}" = "xno"; then
 
39
                try_popt=false
 
40
                popt_msg="no (not requested)"
 
41
        fi
 
42
)
 
43
popt_prefix=$ac_default_prefix
 
44
AC_ARG_WITH(popt-prefix, [  --with-popt-prefix=PREFIX  Location of popt], [
 
45
        popt_prefix="$withval"])
 
46
if $try_popt; then
 
47
        CPPFLAGS_save="$CPPFLAGS"
 
48
        CPPFLAGS="-I$popt_prefix/include $CPPFLAGS"
 
49
        AC_CHECK_HEADER(popt.h, [
 
50
                        AC_CHECK_LIB(popt, poptResetContext, [
 
51
                        have_popt=true
 
52
                        popt_msg=yes
 
53
                        AC_DEFINE(HAVE_POPT,1,[whether we have popt])
 
54
                        POPT_LIBS="-lpopt"
 
55
                        POPT_CFLAGS=$CPPFLAGS
 
56
                ], [
 
57
                        LDFLAGS_save="$LDFLAGS"
 
58
                        LDFLAGS="-L$popt_prefix/lib"
 
59
                        AC_CHECK_LIB(popt, poptStuffArgs, [
 
60
                                have_popt=true
 
61
                                popt_msg="yes (in '$popt_prefix')"
 
62
                                AC_DEFINE(HAVE_POPT,1,[whether we have popt])
 
63
                                POPT_LIBS="-L$popt_prefix/lib -lpopt"
 
64
                                POPT_CFLAGS=$CPPFLAGS
 
65
                ], [popt_pmsg="no (couldn't link)"])
 
66
                LDFLAGS=$LDFLAGS_save
 
67
                ])
 
68
        ])
 
69
        CPPFLAGS="$CPPFLAGS_save"
 
70
fi
 
71
AM_CONDITIONAL(HAVE_POPT, $have_popt)
 
72
AC_SUBST(POPT_LIBS)
 
73
AC_SUBST(POPT_CFLAGS)
 
74
 
 
75
dnl ---------------------------------------------------------------------------
 
76
dnl Warnings: If we have GCC, be paranoid.
 
77
dnl ---------------------------------------------------------------------------
 
78
if test "x$GCC" = "xyes"; then
 
79
    CFLAGS="$CFLAGS -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith"
 
80
    AC_SUBST(CFLAGS)
 
81
fi
 
82
 
 
83
AC_OUTPUT([ 
 
84
  Makefile
 
85
  exif.spec
 
86
  libjpeg/Makefile
 
87
  exif/Makefile
 
88
  m4/Makefile
 
89
  po/Makefile.in
 
90
])
 
91
 
 
92
echo "
 
93
 
 
94
Configuration:
 
95
 
 
96
        Source code location:      ${srcdir}
 
97
        Compiler:                  ${CC}
 
98
"