]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/png/configure.ac
No longer use semi-static IDs for wxPropertyGrid embedded controls and tool bar tools.
[wxWidgets.git] / src / png / configure.ac
... / ...
CommitLineData
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
21PNGLIB_VERSION=1.4.4
22PNGLIB_MAJOR=1
23PNGLIB_MINOR=4
24PNGLIB_RELEASE=4
25
26AC_INIT([libpng], [1.4.4], [png-mng-implement@lists.sourceforge.net])
27AM_INIT_AUTOMAKE
28dnl stop configure from automagically running automake
29AM_MAINTAINER_MODE
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_PROG_INSTALL
42AC_PROG_LN_S
43AC_PROG_MAKE_SET
44LT_INIT([win32-dll])
45
46# Checks for header files.
47AC_HEADER_STDC
48AC_CHECK_HEADERS([malloc.h stdlib.h string.h strings.h])
49
50# Checks for typedefs, structures, and compiler characteristics.
51AC_C_CONST
52AC_TYPE_SIZE_T
53AC_STRUCT_TM
54
55# Checks for library functions.
56AC_FUNC_STRTOD
57AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
58AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
59AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
60
61case $host_os in
62 aix*)
63 LIBPNG_DEFINES="-DPNG_CONFIGURE_LIBPNG -D_ALL_SOURCE";;
64 *)
65 LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG;;
66esac
67LIBPNG_DEFINES=$LIBPNG_DEFINES
68AC_SUBST(LIBPNG_DEFINES)
69
70AC_MSG_CHECKING([if libraries can be versioned])
71# Special case for PE/COFF platforms: ld reports
72# support for version-script, but doesn't actually
73# DO anything with it.
74case $host in
75*cygwin* | *mingw32* )
76 have_ld_version_script=no
77 AC_MSG_RESULT(no)
78;;
79* )
80GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
81if test "$GLD"; then
82 have_ld_version_script=yes
83 AC_MSG_RESULT(yes)
84else
85 have_ld_version_script=no
86 AC_MSG_RESULT(no)
87 AC_MSG_WARN(*** You have not enabled versioned symbols.)
88fi
89;;
90esac
91
92AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
93
94if test "$have_ld_version_script" = "yes"; then
95 AC_MSG_CHECKING([for symbol prefix])
96 SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
97 | ${CPP-${CC-gcc} -E} - 2>&1 \
98 | ${EGREP-grep} "^PREFIX=" \
99 | ${SED-sed} "s:^PREFIX=::"`
100 AC_SUBST(SYMBOL_PREFIX)
101 AC_MSG_RESULT($SYMBOL_PREFIX)
102fi
103
104# Substitutions for .in files
105AC_SUBST(PNGLIB_VERSION)
106AC_SUBST(PNGLIB_MAJOR)
107AC_SUBST(PNGLIB_MINOR)
108AC_SUBST(PNGLIB_RELEASE)
109
110# Additional arguments (and substitutions)
111# Allow the pkg-config directory to be set
112AC_ARG_WITH(pkgconfigdir,
113 AC_HELP_STRING([--with-pkgconfigdir],
114 [Use the specified pkgconfig dir (default is libdir/pkgconfig)]),
115 [pkgconfigdir=${withval}],
116 [pkgconfigdir='${libdir}/pkgconfig'])
117
118AC_SUBST([pkgconfigdir])
119AC_MSG_NOTICE([pkgconfig directory is ${pkgconfigdir}])
120
121# Make the *-config binary config scripts optional
122AC_ARG_WITH(binconfigs,
123 AC_HELP_STRING([--with-binconfigs],
124 [Generate shell libpng-config scripts as well as pkg-config data]
125 [@<:@default=yes@:>@]),
126 [if test "${withval}" = no; then
127 binconfigs=
128 AC_MSG_NOTICE([libpng-config scripts will not be built])
129 else
130 binconfigs='${binconfigs}'
131 fi],
132 [binconfigs='${binconfigs}'])
133AC_SUBST([binconfigs])
134
135# Config files, substituting as above
136AC_CONFIG_FILES([Makefile libpng.pc:libpng.pc.in])
137AC_CONFIG_FILES([libpng-config:libpng-config.in],
138 [chmod +x libpng-config])
139
140AC_OUTPUT