Remove duplicated headers.
[portableproplib.git] / configure.ac
blobf257f60c0ba5c71ec6306429510d4b3974aa4ed3
2 # GNU Autoconf stuff for libprop.
4 AC_PREREQ(2.52)
6 m4_define([proplib_major_version], [0])
7 m4_define([proplib_minor_version], [5])
8 m4_define([proplib_micro_version], [1])
9 m4_define([proplib_version],
10           [proplib_major_version.proplib_minor_version.proplib_micro_version])
12 AC_INIT([proplib], [proplib_version])
13 ## must come before we use the $USE_MAINTAINER_MODE variable later
14 AM_MAINTAINER_MODE
16 # libtool versioning
18 # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
21 ## increment if the interface has additions, changes, removals.
22 LT_CURRENT=0
24 ## increment any time the source changes; set to
25 ##  0 if you increment CURRENT
26 LT_REVISION=9
28 ## increment if any interfaces have been added; set to 0
29 ## if any interfaces have been changed or removed. removal has
30 ## precedence over adding, so set to 0 if both happened.
31 LT_AGE=0
33 AC_SUBST(LT_CURRENT)
34 AC_SUBST(LT_REVISION)
35 AC_SUBST(LT_AGE)
37 AM_INIT_AUTOMAKE
38 AC_PROG_CC_C99
39 if test "$ac_cv_prog_cc_c99" = "no"; then
40         AC_MSG_ERROR(*** A working C99 compiler is required, aborting ***)
42 AC_PROG_LIBTOOL
44 AC_CONFIG_HEADERS([config.h])
45 AC_CONFIG_FILES([Makefile
46                  include/Makefile
47                  include/prop/Makefile
48                  man/Makefile
49                  src/Makefile
50                  proplib.pc])
51 AC_CONFIG_MACRO_DIR([m4])
53 AC_CHECK_HEADERS(limits.h stddef.h fcntl.h)
54 AC_CHECK_FUNCS(memmove memset munmap strchr strtoul stroull strlcat)
55 AC_CHECK_LIB(pthread, pthread_mutex_init, ,
56              AC_MSG_ERROR(*** A POSIX threads library is required, aborting ***))
57 AC_CHECK_LIB(z, inflate, ,
58              AC_MSG_ERROR(*** zlib is required, aborting ***))
60 AC_C_CONST
61 AC_FUNC_MEMCMP
62 AC_FUNC_MMAP
63 AC_HEADER_STDBOOL
64 AC_HEADER_STDC
65 AC_TYPE_INT16_T
66 AC_TYPE_INT32_T
67 AC_TYPE_INT64_T
68 AC_TYPE_INT8_T
69 AC_TYPE_MODE_T
70 AC_TYPE_OFF_T
71 AC_TYPE_SIZE_T
72 AC_TYPE_SSIZE_T
73 AC_TYPE_UINT16_T
74 AC_TYPE_UINT32_T
75 AC_TYPE_UINT64_T
76 AC_TYPE_UINT8_T
78 CC_CHECK_CFLAGS_APPEND([-pipe -Werror -Wall -Wextra -Wvla -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-all])
80 AC_OUTPUT