comparison configure.in @ 123:ab2a11e72250

more cleanup of #include files. common.h is the only file allowed to include system .h files unprotected by autoconf HAVE_ symbols. define.h is the only other file allowed to include system .h files. define.h is never installed; common.h is installed if we are building the shared library.
author Carl Byington <carl@five-ten-sg.com>
date Tue, 03 Feb 2009 10:59:10 -0800
parents bdb38b434c0a
children 7f747c8c9d02
comparison
equal deleted inserted replaced
122:bdb38b434c0a 123:ab2a11e72250
1 AC_PREREQ(2.59) 1 AC_PREREQ(2.59)
2 AC_INIT(libpst,0.6.26,carl@five-ten-sg.com) 2 AC_INIT(libpst,0.6.26,carl@five-ten-sg.com)
3 AC_CONFIG_SRCDIR([config.h.in]) 3 AC_CONFIG_SRCDIR([config.h.in])
4 AC_CONFIG_HEADER([config.h]) 4 AC_CONFIG_HEADER([config.h])
5
6 AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION) 5 AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)
7
8 AC_CANONICAL_HOST 6 AC_CANONICAL_HOST
7
9 8
10 # Check for win32 which needs iconv library specified on the link line 9 # Check for win32 which needs iconv library specified on the link line
11 AC_MSG_CHECKING([for Win32]) 10 AC_MSG_CHECKING([for Win32])
12 case "$host" in 11 case "$host" in
13 *-mingw*) 12 *-mingw*)
18 ;; 17 ;;
19 esac 18 esac
20 AC_MSG_RESULT($os_win32) 19 AC_MSG_RESULT($os_win32)
21 AM_CONDITIONAL(OS_WIN32, [test "$os_win32" = "yes"]) 20 AM_CONDITIONAL(OS_WIN32, [test "$os_win32" = "yes"])
22 21
22
23 # Check for Win32 platform 23 # Check for Win32 platform
24 AC_MSG_CHECKING([for Win32 platform in general]) 24 AC_MSG_CHECKING([for Win32 platform in general])
25 case "$host" in 25 case "$host" in
26 *-cygwin*) 26 *-cygwin*)
27 platform_win32=yes 27 platform_win32=yes
54 ], 54 ],
55 # default if not specified 55 # default if not specified
56 enable_dii=yes 56 enable_dii=yes
57 ) 57 )
58 AC_MSG_RESULT([$enable_dii]) 58 AC_MSG_RESULT([$enable_dii])
59 if test "$enable_dii" = "yes"; then 59 AC_PATH_PROG(CONVERT, convert)
60 AC_PATH_PROG(CONVERT, convert) 60 if test "x$CONVERT" = "x" ; then
61 if test "x$CONVERT" = "x" ; then 61 if test "$enable_dii" = "yes"; then
62 AC_MSG_WARN([convert not found. pst2dii disabled])
63 enable_dii=no 62 enable_dii=no
63 AC_MSG_WARN([convert program not found. pst2dii disabled])
64 fi 64 fi
65 fi 65 else
66 if test "$enable_dii" = "yes"; then 66 if test "x`$CONVERT --version 2>&1 | grep -i imagemagick >/dev/null ; echo $?`" != "x0"; then
67 AC_CHECK_HEADER([gd.h], , [ 67 if test "$enable_dii" = "yes"; then
68 enable_dii=no 68 enable_dii=no
69 AC_MSG_WARN([gd.h not found. pst2dii disabled]) 69 AC_MSG_WARN([wrong convert program found. pst2dii disabled])
70 ]) 70 fi
71 fi 71 fi
72 fi
73 AC_CHECK_HEADER([gd.h],
74 [
75 AC_DEFINE([HAVE_GD_H], [1], [Define to 1 if you have the <gd.h> header file.])
76 ],
77 [
78 if test "$enable_dii" = "yes"; then
79 enable_dii=no
80 AC_MSG_WARN([gd.h not found. pst2dii disabled])
81 fi
82 ])
72 AM_CONDITIONAL(BUILD_DII, [test "$enable_dii" = "yes"]) 83 AM_CONDITIONAL(BUILD_DII, [test "$enable_dii" = "yes"])
73 84
74 85
75 # Checks for programs. 86 # Checks for programs.
76 AC_PROG_CXX 87 AC_PROG_CXX
81 AC_PROG_LN_S 92 AC_PROG_LN_S
82 AC_PROG_LIBTOOL 93 AC_PROG_LIBTOOL
83 AC_PROG_MAKE_SET 94 AC_PROG_MAKE_SET
84 AC_PROG_RANLIB 95 AC_PROG_RANLIB
85 96
97
98 # make sure we get large file support
86 AC_SYS_LARGEFILE 99 AC_SYS_LARGEFILE
87 AC_CHECK_SIZEOF(off_t) 100 AC_CHECK_SIZEOF(off_t)
101
88 102
89 # Checks for header files. 103 # Checks for header files.
90 AC_CHECK_HEADER([unistd.h], 104 AC_CHECK_HEADER([unistd.h],
91 AM_CONDITIONAL(NEED_XGETOPT, [test yes = no]), 105 AM_CONDITIONAL(NEED_XGETOPT, [test yes = no]),
92 AM_CONDITIONAL(NEED_XGETOPT, [test yes = yes]) 106 AM_CONDITIONAL(NEED_XGETOPT, [test yes = yes])
93 ) 107 )
94 AC_HEADER_DIRENT 108 AC_HEADER_DIRENT
95 AC_HEADER_STDC 109 AC_HEADER_STDC
96 AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h inttypes.h limits.h regex.h signal.h stdarg.h stdint.h stdio.h stdlib.h string.h sys/param.h sys/stat.h sys/types.h time.h unistd.h wchar.h]) 110 AC_CHECK_HEADERS([ctype.h dirent.h errno.h fcntl.h iconv.h inttypes.h limits.h regex.h signal.h stdarg.h stdint.h stdio.h stdlib.h string.h sys/param.h sys/stat.h sys/types.h time.h unistd.h wchar.h])
111
97 112
98 # Checks for typedefs, structures, and compiler characteristics. 113 # Checks for typedefs, structures, and compiler characteristics.
99 AC_HEADER_STDBOOL 114 AC_HEADER_STDBOOL
100 AC_C_CONST 115 AC_C_CONST
101 AC_TYPE_OFF_T 116 AC_TYPE_OFF_T
102 AC_TYPE_SIZE_T 117 AC_TYPE_SIZE_T
103 AC_STRUCT_TM 118 AC_STRUCT_TM
119
104 120
105 # Checks for library functions. 121 # Checks for library functions.
106 AC_FUNC_FSEEKO 122 AC_FUNC_FSEEKO
107 AC_FUNC_LSTAT 123 AC_FUNC_LSTAT
108 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK 124 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
112 AC_FUNC_REALLOC 128 AC_FUNC_REALLOC
113 fi 129 fi
114 AC_FUNC_STRFTIME 130 AC_FUNC_STRFTIME
115 AC_FUNC_VPRINTF 131 AC_FUNC_VPRINTF
116 AC_CHECK_FUNCS([memchr memmove memset strcasecmp strncasecmp strchr strdup strerror strpbrk strrchr strstr strtol]) 132 AC_CHECK_FUNCS([memchr memmove memset strcasecmp strncasecmp strchr strdup strerror strpbrk strrchr strstr strtol])
133
117 134
118 # iconv on mac is a library 135 # iconv on mac is a library
119 SAVELIBS="$LIBS" 136 SAVELIBS="$LIBS"
120 AC_SEARCH_LIBS([iconv_open], [iconv]) 137 AC_SEARCH_LIBS([iconv_open], [iconv])
121 if test "$SAVELIBS" != "$LIBS"; then 138 if test "$SAVELIBS" != "$LIBS"; then
233 if test "$enable_static_tools" = "yes"; then 250 if test "$enable_static_tools" = "yes"; then
234 enable_static="yes" 251 enable_static="yes"
235 fi 252 fi
236 253
237 254
238 AC_MSG_CHECKING([system enable shared])
239 AC_MSG_RESULT([$enable_shared])
240 AC_MSG_CHECKING([system enable static])
241 AC_MSG_RESULT([$enable_static])
242
243
244
245 AC_OUTPUT( \ 255 AC_OUTPUT( \
246 Makefile \ 256 Makefile \
247 debian/Makefile \ 257 debian/Makefile \
248 debian/changelog \ 258 debian/changelog \
249 html/Makefile \ 259 html/Makefile \