1AC_PREREQ(2.60)
2AC_INIT([libfpx],[1.3.1-10],[http://www.imagemagick.org],[libfpx])
3AC_CONFIG_SRCDIR(fpx/buffdesc.h)
4AC_CONFIG_AUX_DIR([config])
5AC_CONFIG_MACRO_DIR([m4])
6AC_CONFIG_HEADERS([fpxlib-config.h])
7AC_CONFIG_FILES(Makefile basics/Makefile fpx/Makefile jpeg/Makefile \
8  ole/Makefile ri_image/Makefile oless/Makefile)
9
10# Set version
11MAJOR_VERSION=1
12MINOR_VERSION=3
13MICRO_VERSION=1
14PATCH_VERSION=10
15echo "configuring Digital Imaging Group FlashPIX ${PACKAGE_VERSION}${PACKAGE_VERSION_ADDENDUM}"
16AC_SUBST(MAJOR_VERSION)dnl
17AC_SUBST(MINOR_VERSION)dnl
18AC_SUBST(MICRO_VERSION)dnl
19AC_SUBST(PATCH_VERSION)dnl
20
21# Ensure that make can run correctly
22AC_CANONICAL_SYSTEM
23AM_SANITY_CHECK
24
25AM_INIT_AUTOMAKE([foreign subdir-objects dist-zip dist-bzip2 dist-xz tar-ustar -Wall])
26
27# Add configure option --enable-maintainer-mode which enables dependency
28# checking and generation useful to package maintainers.  This is made an
29# option to avoid confusing end users.
30AM_MAINTAINER_MODE
31
32#
33# Specify path to shared libstdc++ if not in normal location
34#
35AC_ARG_WITH(libstdc,
36  [  --with-libstdc=DIR      use libstdc++ in DIR (for GNU C++)],
37  [if test "$withval" != no -a "$withval" != yes; then
38    if test -d "$withval"; then
39      LIBSTDCLDFLAGS="-L$withval"
40    fi
41  fi])
42AC_SUBST(LIBSTDCLDFLAGS)
43
44CPPFLAGS="-D_UNIX $CPPFLAGS"
45
46# Check for programs
47AC_PROG_CC
48AC_PROG_CC_STDC
49AC_PROG_CPP
50AM_PROG_LD
51AC_SUBST(LD)
52AM_PROG_CC_C_O
53AC_PROG_INSTALL
54AC_PROG_MAKE_SET
55AC_PROG_LN_S
56
57#
58# Enable OS features.
59#
60AC_GNU_SOURCE
61
62#
63# Tests for Windows
64#
65AC_EXEEXT
66AC_OBJEXT
67
68# Checks for typedefs, structures, and compiler characteristics.
69AC_C_CONST
70AC_C_INLINE
71AC_C_BIGENDIAN
72
73AC_CHECK_HEADERS([wchar.h sys/statfs.h sys/statvfs.h sys/time.h])
74
75# <sys/mount.h> depends on <sys/param.h>
76AC_CHECK_HEADERS([sys/param.h])
77AC_CHECK_HEADERS([sys/mount.h], [], [], [#if HAVE_SYS_PARAM_H
78# include <sys/param.h>
79# endif ])
80
81#
82# Configure libtool
83#
84AC_ENABLE_SHARED(yes)
85AC_ENABLE_STATIC(yes)
86AC_PROG_LIBTOOL
87AC_SUBST(LIBTOOL_DEPS)
88
89AC_LANG_CPLUSPLUS
90AC_PROG_CXX
91
92AC_OUTPUT()
93