annotate configure.in @ 121:8399ef94c11b

strip and regenerate all MIME headers to avoid duplicates. do a better job of making unique MIME boundaries. only use base64 coding when strictly necessary.
author Carl Byington <carl@five-ten-sg.com>
date Sun, 01 Feb 2009 19:21:47 -0800
parents 6395ced2b8b2
children bdb38b434c0a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
1 AC_PREREQ(2.59)
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
2 AC_INIT(libpst,0.6.26,carl@five-ten-sg.com)
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
3 AC_CONFIG_SRCDIR([config.h.in])
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
4 AC_CONFIG_HEADER([config.h])
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
5
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
6 AM_INIT_AUTOMAKE($PACKAGE_NAME,$PACKAGE_VERSION)
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
7
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
8 AC_CANONICAL_HOST
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
9
120
6395ced2b8b2 disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 118
diff changeset
10 # Check for win32 which needs iconv library specified on the link line
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
11 AC_MSG_CHECKING([for Win32])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
12 case "$host" in
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
13 *-mingw*)
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
14 os_win32=yes
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
15 ;;
120
6395ced2b8b2 disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 118
diff changeset
16 *cygwin*)
6395ced2b8b2 disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 118
diff changeset
17 os_win32=yes
6395ced2b8b2 disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 118
diff changeset
18 enable_dii=no # cygwin would find windir/system32/convert, not image magick convert
6395ced2b8b2 disable building pst2dii on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 118
diff changeset
19 ;;
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
20 *)
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
21 os_win32=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
22 ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
23 esac
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
24 AC_MSG_RESULT($os_win32)
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
25 AM_CONDITIONAL(OS_WIN32, [test "$os_win32" = "yes"])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
26
99
b7f456946c5b add configure option --enable-dii=no to remove dependency on libgd.
Carl Byington <carl@five-ten-sg.com>
parents: 96
diff changeset
27
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
28 # Checks for programs.
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
29 # The following lines adds the --enable-dii option to configure:
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
30 #
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
31 # Give the user the choice to enter one of these:
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
32 # --enable-dii
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
33 # --enable-dii=yes
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
34 # --enable-dii=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
35 #
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
36 AC_MSG_CHECKING([whether we are enabling dii utility])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
37 AC_ARG_ENABLE(dii,
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
38 AC_HELP_STRING([--enable-dii], [enable dii utility]),
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
39 [
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
40 case "${enableval}" in
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
41 yes) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
42 no) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
43 *) AC_MSG_ERROR(bad value ${enableval} for --enable-dii) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
44 esac
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
45 ],
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
46 # default if not specified
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
47 enable_dii=yes
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
48 )
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
49 AC_MSG_RESULT([$enable_dii])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
50 if test "$enable_dii" = "yes"; then
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
51 AC_PATH_PROG(CONVERT, convert)
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
52 if test "x$CONVERT" = "x" ; then
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
53 AC_MSG_WARN([convert not found. pst2dii disabled])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
54 enable_dii=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
55 fi
63
cfd6175f9334 Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents: 61
diff changeset
56 fi
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
57 if test "$enable_dii" = "yes"; then
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
58 AC_CHECK_HEADER([gd.h], , [
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
59 enable_dii=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
60 AC_MSG_WARN([gd.h not found. pst2dii disabled])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
61 ])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
62 fi
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
63 AM_CONDITIONAL(BUILD_DII, [test "$enable_dii" = "yes"])
63
cfd6175f9334 Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents: 61
diff changeset
64
99
b7f456946c5b add configure option --enable-dii=no to remove dependency on libgd.
Carl Byington <carl@five-ten-sg.com>
parents: 96
diff changeset
65
63
cfd6175f9334 Start work on pst2dii to convert to Summation dii load file format.
Carl Byington <carl@five-ten-sg.com>
parents: 61
diff changeset
66 # Checks for programs.
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
67 AC_PROG_CXX
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
68 AC_PROG_CC
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
69 AM_PROG_CC_C_O
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
70 AC_PROG_CPP
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
71 AC_PROG_INSTALL
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
72 AC_PROG_LN_S
95
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
73 AC_PROG_LIBTOOL
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
74 AC_PROG_MAKE_SET
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
75 AC_PROG_RANLIB
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
76
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
77 AC_SYS_LARGEFILE
75
987aa872294e Use ftello/fseeko to properly handle large files.
Carl Byington <carl@five-ten-sg.com>
parents: 73
diff changeset
78 AC_CHECK_SIZEOF(off_t)
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
79
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
80 # Checks for header files.
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
81 AC_CHECK_HEADER([unistd.h],
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
82 AM_CONDITIONAL(NEED_XGETOPT, [test yes = no]),
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
83 AM_CONDITIONAL(NEED_XGETOPT, [test yes = yes])
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
84 )
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
85 AC_HEADER_DIRENT
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
86 AC_HEADER_STDC
121
8399ef94c11b strip and regenerate all MIME headers to avoid duplicates.
Carl Byington <carl@five-ten-sg.com>
parents: 120
diff changeset
87 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])
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
88
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
89 # Checks for typedefs, structures, and compiler characteristics.
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
90 AC_HEADER_STDBOOL
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
91 AC_C_CONST
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
92 AC_TYPE_OFF_T
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
93 AC_TYPE_SIZE_T
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
94 AC_STRUCT_TM
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
95
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
96 # Checks for library functions.
75
987aa872294e Use ftello/fseeko to properly handle large files.
Carl Byington <carl@five-ten-sg.com>
parents: 73
diff changeset
97 AC_FUNC_FSEEKO
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
98 AC_FUNC_LSTAT
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
99 AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
100 if test "$cross_compiling" != "yes"; then
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
101 AC_FUNC_MALLOC
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
102 AC_FUNC_MKTIME
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
103 AC_FUNC_REALLOC
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
104 fi
59
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
105 AC_FUNC_STRFTIME
7d5c637aaafb General cleanup and code fixes.
Carl Byington <carl@five-ten-sg.com>
parents: 52
diff changeset
106 AC_FUNC_VPRINTF
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
107 AC_CHECK_FUNCS([memchr memmove memset strcasecmp strncasecmp strchr strdup strerror strpbrk strrchr strstr strtol])
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
108
93
cb14583c119a iconv changes for Mac
Carl Byington <carl@five-ten-sg.com>
parents: 90
diff changeset
109 # iconv on mac is a library
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
110 SAVELIBS="$LIBS"
93
cb14583c119a iconv changes for Mac
Carl Byington <carl@five-ten-sg.com>
parents: 90
diff changeset
111 AC_SEARCH_LIBS([iconv_open], [iconv])
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
112 if test "$SAVELIBS" != "$LIBS"; then
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
113 all_libraries="-L/usr/lib $all_libraries"
99
b7f456946c5b add configure option --enable-dii=no to remove dependency on libgd.
Carl Byington <carl@five-ten-sg.com>
parents: 96
diff changeset
114 AC_SUBST(all_libraries)
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
115 AC_MSG_WARN([This should be building on Mac OSX, adding /usr/lib to the library path])
99
b7f456946c5b add configure option --enable-dii=no to remove dependency on libgd.
Carl Byington <carl@five-ten-sg.com>
parents: 96
diff changeset
116 fi
93
cb14583c119a iconv changes for Mac
Carl Byington <carl@five-ten-sg.com>
parents: 90
diff changeset
117
114
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
118 AC_MSG_CHECKING([if iconv uses const arguments])
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
119 AC_LANG_PUSH([C++])
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
120 AC_COMPILE_IFELSE([
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
121 #include <iconv.h>
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
122 #include <stddef.h>
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
123 int main(int argc, char* const* argv)
114
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
124 {
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
125 size_t inlen = 100;
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
126 char buffer[[inlen]];
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
127 char *p = buffer;
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
128 size_t utf8_len = 2 * inlen + 1;
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
129 char utf8_buffer[[utf8_len]];
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
130 char *utf8_p = utf8_buffer;
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
131 iconv_t cd = 0;
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
132 iconv(cd, (const char**)&p, &inlen, &utf8_p, &utf8_len);
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
133 }
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
134 ],
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
135 [AC_DEFINE(ICONV_CONST,const,[do we have const headers])
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
136 AC_MSG_RESULT([yes])
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
137 ],
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
138 [AC_DEFINE(ICONV_CONST,,[do we have const headers])
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
139 AC_MSG_RESULT([no])
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
140 ])
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
141 AC_LANG_POP([C++])
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
142
e213bfcf9aa7 patch from Chris Eagle to build on cygwin
Carl Byington <carl@five-ten-sg.com>
parents: 112
diff changeset
143
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
144 # The following lines adds the --enable-pst-debug option to configure:
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
145 #
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
146 # Give the user the choice to enter one of these:
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
147 # --enable-pst-debug
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
148 # --enable-pst-debug=yes
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
149 # --enable-pst-debug=no
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
150 #
34
07177825c91b fix signed/unsigned to allow very small pst files with only leaf nodes
carl
parents: 31
diff changeset
151 AC_MSG_CHECKING([whether we are forcing debug dump file creation])
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
152 AC_ARG_ENABLE(pst-debug,
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
153 AC_HELP_STRING([--enable-pst-debug], [force debug dump file creation]),
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
154 [
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
155 case "${enableval}" in
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
156 yes) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
157 no) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
158 *) AC_MSG_ERROR(bad value ${enableval} for --enable-pst-debug) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
159 esac
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
160 ],
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
161 # default if not specified
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
162 enable_pst_debug=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
163 )
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
164 AC_MSG_RESULT([$enable_pst_debug])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
165 if test "$enable_pst_debug" = "yes"; then
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
166 AC_DEFINE(DEBUG_ALL, 1, Define to 1 to force debug dump file creation)
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
167 fi
31
b88ceb81dba2 mege changes from Joe Nahmias
carl
parents: 28
diff changeset
168
78
535075b4d261 Patch from Joachim Metz for debian packaging, and fix for incorrect length on lz decompression.
Carl Byington <carl@five-ten-sg.com>
parents: 77
diff changeset
169
95
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
170 # The following lines adds the --enable-libpst-shared option to configure:
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
171 #
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
172 # Give the user the choice to enter one of these:
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
173 # --enable-libpst-shared
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
174 # --enable-libpst-shared=yes
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
175 # --enable-libpst-shared=no
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
176 #
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
177 AC_MSG_CHECKING([whether we are building libpst shared object])
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
178 AC_ARG_ENABLE(libpst-shared,
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
179 AC_HELP_STRING([--enable-libpst-shared], [build libpst shared object]),
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
180 [
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
181 case "${enableval}" in
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
182 yes) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
183 no) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
184 *) AC_MSG_ERROR(bad value ${enableval} for --enable-libpst-shared) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
185 esac
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
186 ],
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
187 # default if not specified
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
188 enable_libpst_shared=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
189 )
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
190 AC_MSG_RESULT([$enable_libpst_shared])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
191 enable_static_tools=yes
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
192 if test "$enable_libpst_shared" = "yes"; then
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
193 enable_shared=yes
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
194 enable_static_tools=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
195 fi
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
196
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
197
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
198 # needed by STATIC_TOOLS in src/Makefile.am
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
199 AC_SUBST(PST_OBJDIR, [$objdir])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
200
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
201
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
202 # The following lines adds the --enable-static-tools option to configure:
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
203 #
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
204 # Give the user the choice to enter one of these:
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
205 # --enable-static-tools
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
206 # --enable-static-tools=yes
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
207 # --enable-static-tools=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
208 #
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
209 AC_MSG_CHECKING([whether to link command line tools with libpst statically])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
210 AC_ARG_ENABLE([static-tools],
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
211 AC_HELP_STRING([--enable-static-tools], [link command line tools with libpst statically]),
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
212 [
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
213 case "${enableval}" in
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
214 yes) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
215 no) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
216 *) AC_MSG_ERROR(bad value ${enableval} for --static-tools) ;;
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
217 esac
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
218 ],
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
219 [
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
220 enable_static_tools=no
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
221 ])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
222 AC_MSG_RESULT([$enable_static_tools])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
223 AM_CONDITIONAL(STATIC_TOOLS, [test "$enable_static_tools" = "yes"])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
224 if test "$enable_static_tools" = "yes"; then
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
225 enable_static="yes"
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
226 fi
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
227
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
228
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
229 AC_MSG_CHECKING([system enable shared])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
230 AC_MSG_RESULT([$enable_shared])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
231 AC_MSG_CHECKING([system enable static])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
232 AC_MSG_RESULT([$enable_static])
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
233
95
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
234
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
235
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
236 AC_OUTPUT( \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
237 Makefile \
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
238 debian/Makefile \
78
535075b4d261 Patch from Joachim Metz for debian packaging, and fix for incorrect length on lz decompression.
Carl Byington <carl@five-ten-sg.com>
parents: 77
diff changeset
239 debian/changelog \
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
240 html/Makefile \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
241 info/Makefile \
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
242 libpst.pc \
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
243 libpst.spec \
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
244 libpst/Makefile \
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
245 man/Makefile \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
246 src/Makefile \
95
ff1743cbe4aa initial attempt at building a shared library
Carl Byington <carl@five-ten-sg.com>
parents: 93
diff changeset
247 src/pst2dii.cpp \
16
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
248 xml/Makefile \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
249 xml/libpst \
c508ee15dfca switch to automake/autoconf
carl
parents:
diff changeset
250 )