source: trunk/src/3rdparty/libpng/configure.ac@ 1036

Last change on this file since 1036 was 846, checked in by Dmitry A. Kuminov, 14 years ago

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

File size: 3.5 KB
Line 
1# configure.ac
2
3dnl Process this file with autoconf to produce a configure script.
4dnl
5dnl Minor upgrades (compatible ABI): increment the package version
6dnl (third field in two places below) and set the PNGLIB_RELEASE
7dnl variable.
8dnl
9dnl Major upgrades (incompatible ABI): increment the package major
10dnl version (second field, or first if desired), set the minor
11dnl to 0, set PNGLIB_MAJOR below *and* follow the instructions in
12dnl Makefile.am to upgrade the package name.
13
14dnl This is here to prevent earlier autoconf from being used, it
15dnl should not be necessary to regenerate configure if the time
16dnl stamps are correct
17AC_PREREQ(2.59)
18
19dnl Version number stuff here:
20
21AC_INIT([libpng], [1.4.0], [png-mng-implement@lists.sourceforge.net])
22AM_INIT_AUTOMAKE
23dnl stop configure from automagically running automake
24AM_MAINTAINER_MODE
25
26PNGLIB_VERSION=1.4.0
27PNGLIB_MAJOR=1
28PNGLIB_MINOR=4
29PNGLIB_RELEASE=0
30
31dnl End of version number stuff
32
33AC_CONFIG_SRCDIR([pngget.c])
34AM_CONFIG_HEADER(config.h)
35
36# Checks for programs.
37AC_PROG_CC
38AC_PROG_LD
39AC_PROG_CPP
40AC_CHECK_TOOL(SED, sed, :)
41AC_LIBTOOL_WIN32_DLL
42AC_PROG_INSTALL
43AC_PROG_LN_S
44AC_PROG_MAKE_SET
45AC_PROG_LIBTOOL
46
47# Checks for header files.
48AC_HEADER_STDC
49AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
50
51# Checks for typedefs, structures, and compiler characteristics.
52AC_C_CONST
53AC_TYPE_SIZE_T
54AC_STRUCT_TM
55
56# Checks for library functions.
57AC_FUNC_STRTOD
58AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
59AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
60AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
61
62LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
63LIBPNG_DEFINES=$LIBPNG_DEFINES
64AC_SUBST(LIBPNG_DEFINES)
65
66AC_MSG_CHECKING([if libraries can be versioned])
67GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
68if test "$GLD"; then
69 have_ld_version_script=yes
70 AC_MSG_RESULT(yes)
71else
72 have_ld_version_script=no
73 AC_MSG_RESULT(no)
74 AC_MSG_WARN(*** You have not enabled versioned symbols.)
75fi
76AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
77
78if test "$have_ld_version_script" = "yes"; then
79 AC_MSG_CHECKING([for symbol prefix])
80 SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
81 | ${CPP-${CC-gcc} -E} - 2>&1 \
82 | ${EGREP-grep} "^PREFIX=" \
83 | ${SED-sed} "s:^PREFIX=::"`
84 AC_SUBST(SYMBOL_PREFIX)
85 AC_MSG_RESULT($SYMBOL_PREFIX)
86fi
87
88# Substitutions for .in files
89AC_SUBST(PNGLIB_VERSION)
90AC_SUBST(PNGLIB_MAJOR)
91AC_SUBST(PNGLIB_MINOR)
92AC_SUBST(PNGLIB_RELEASE)
93
94# Additional arguments (and substitutions)
95# Allow the pkg-config directory to be set
96AC_ARG_WITH(pkgconfigdir,
97 AC_HELP_STRING([--with-pkgconfigdir],
98 [Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
99 [pkgconfigdir=${withval}],
100 [pkgconfigdir='${libdir}/pkgconfig'])
101
102AC_SUBST([pkgconfigdir])
103AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
104
105# Make the *-config binary config scripts optional
106AC_ARG_WITH(binconfigs,
107 AC_HELP_STRING([--with-binconfigs],
108 [Generate shell libpng-config scripts as well as pkg-config data]
109 [@<:@default=yes@:>@]),
110 [if test "${withval}" = no; then
111 binconfigs=
112 AC_MSG_NOTICE([libpng-config scripts will not be built])
113 else
114 binconfigs='${binconfigs}'
115 fi],
116 [binconfigs='${binconfigs}'])
117AC_SUBST([binconfigs])
118
119# Config files, substituting as above
120AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
121AC_CONFIG_FILES([libpng-config:libpng-config.in],
122 [chmod +x libpng-config])
123
124AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.