/[public]/psiconv/trunk/configure.in
ViewVC logotype

Contents of /psiconv/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49 - (show annotations)
Fri Jul 14 20:44:40 2000 UTC (19 years, 3 months ago) by frodo
File size: 5497 byte(s)
(Frodo) First stab at ImageMagick 5 support. Still problems with listing
        all filetypes, though.

1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(psiconv)
3 AM_INIT_AUTOMAKE(psiconv,0.6.1)
4
5 AM_CONFIG_HEADER(config.h)
6
7 dnl Checks for programs.
8 AM_PROG_LIBTOOL
9
10 dnl This is stolen from gnome-libs-1.0.14
11 AC_ARG_ENABLE(compile-warnings,
12 [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],
13 ,enable_compile_warnings=minimum)
14
15 AC_MSG_CHECKING(what warning flags to pass to the C compiler)
16 warnCFLAGS=
17 if test "x$GCC" != xyes; then
18 enable_compile_warnings=no
19 fi
20 if test "x$enable_compile_warnings" != "xno"; then
21 if test "x$GCC" = "xyes"; then
22 case " $CFLAGS " in
23 *[\ \ ]-Wall[\ \ ]*) ;;
24 *) warnCFLAGS="-Wall -Wunused" ;;
25 esac
26
27 ## -W is not all that useful. And it cannot be controlled
28 ## with individual -Wno-xxx flags, unlike -Wall
29 if test "x$enable_compile_warnings" = "xyes"; then
30 warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith"
31 fi
32 fi
33 fi
34 AC_MSG_RESULT($warnCFLAGS)
35
36 AC_ARG_ENABLE(iso-c,
37 [ --enable-iso-c Try to warn if code is not ISO C ],,
38 enable_iso_c=no)
39
40 AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
41 complCFLAGS=
42 if test "x$enable_iso_c" != "xno"; then
43 if test "x$GCC" = "xyes"; then
44 case " $CFLAGS " in
45 *[\ \ ]-ansi[\ \ ]*) ;;
46 *) complCFLAGS="$complCFLAGS -ansi" ;;
47 esac
48
49 case " $CFLAGS " in
50 *[\ \ ]-pedantic[\ \ ]*) ;;
51 *) complCFLAGS="$complCFLAGS -pedantic" ;;
52 esac
53 fi
54 fi
55 AC_MSG_RESULT($complCFLAGS)
56 if test "x$cflags_set" != "xyes"; then
57 CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
58 cflags_set=yes
59 AC_SUBST(cflags_set)
60 fi
61
62
63 dnl Checks for libraries.
64 AC_ARG_WITH(imagemagick,
65 [ --with-imagemagick enable ImageMagick (default = yes)],
66 [IMAGEMAGICK=$withval],
67 [IMAGEMAGICK='yes'])
68 if test x"$IMAGEMAGICK" != xno ; then
69 AC_CHECK_LIB(Magick,ConstituteImage,IMAGEMAGICK=yes,IMAGEMAGICK=no)
70 if test x"$IMAGEMAGICK" = xno ; then
71 AC_MSG_WARN(ImageMagick support disabled!)
72 fi
73 fi
74 if test x"$IMAGEMAGICK" = xyes ; then
75 LIB_MAGICK=-lMagick
76 AC_DEFINE(IMAGEMAGICK)
77 else
78 LIB_MAGICK=
79 fi
80 AC_SUBST(LIB_MAGICK)
81
82 dnl Checks for header files.
83 AC_HEADER_STDC
84 AC_CHECK_HEADERS(unistd.h)
85
86 dnl Checks for typedefs, structures, and compiler characteristics.
87 AC_C_CONST
88 AC_TYPE_SIZE_T
89
90 dnl Here we check for large enough integer types. This is not quite
91 dnl good enough, but it should work almost always.
92
93 AC_CHECK_SIZEOF(char,1)
94 AC_CHECK_SIZEOF(short,1)
95 AC_CHECK_SIZEOF(int,2)
96 AC_CHECK_SIZEOF(long,4)
97
98 AC_MSG_CHECKING(for an 8 bit integer type)
99 if test $ac_cv_sizeof_char -ge 1 ; then
100 INT_8_BIT=char
101 AC_MSG_RESULT(char)
102 elif test $ac_cv_sizeof_short -ge 1 ; then
103 INT_8_BIT=short
104 AC_MSG_RESULT(short)
105 elif test $ac_cv_sizeof_int -ge 1 ; then
106 INT_8_BIT=int
107 AC_MSG_RESULT(int)
108 elif test $ac_cv_sizeof_long -ge 1 ; then
109 INT_8_BIT=long
110 AC_MSG_RESULT(long)
111 else
112 AC_MSG_ERROR(No integer type of at least 8 bits found)
113 fi
114
115 AC_MSG_CHECKING(for a 16 bit integer type)
116 if test $ac_cv_sizeof_char -ge 2 ; then
117 INT_16_BIT=char
118 AC_MSG_RESULT(char)
119 elif test $ac_cv_sizeof_short -ge 2 ; then
120 INT_16_BIT=short
121 AC_MSG_RESULT(short)
122 elif test $ac_cv_sizeof_int -ge 2 ; then
123 INT_16_BIT=int
124 AC_MSG_RESULT(int)
125 elif test $ac_cv_sizeof_long -ge 2 ; then
126 INT_16_BIT=long
127 AC_MSG_RESULT(long)
128 else
129 AC_MSG_ERROR(No integer type of at least 16 bits found)
130 fi
131
132 AC_MSG_CHECKING(for a 32 bit integer type)
133 if test $ac_cv_sizeof_char -ge 4 ; then
134 INT_32_BIT=char
135 AC_MSG_RESULT(char)
136 elif test $ac_cv_sizeof_short -ge 4 ; then
137 INT_32_BIT=short
138 AC_MSG_RESULT(short)
139 elif test $ac_cv_sizeof_int -ge 4 ; then
140 INT_32_BIT=int
141 AC_MSG_RESULT(int)
142 elif test $ac_cv_sizeof_long -ge 4 ; then
143 INT_32_BIT=long
144 AC_MSG_RESULT(long)
145 else
146 AC_MSG_ERROR(No integer type of at least 32 bits found)
147 fi
148
149 AC_SUBST(INT_8_BIT)
150 AC_SUBST(INT_16_BIT)
151 AC_SUBST(INT_32_BIT)
152
153 dnl Checks for library functions.
154 AC_FUNC_VPRINTF
155 AC_REPLACE_FUNCS(strdup)
156 AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
157
158
159 dnl With and without functions
160 AC_ARG_ENABLE(html-docs,
161 [ --disable-html-docs Disable generation of HTML 3.2 docs (default: on)],
162 [case "${enableval}" in
163 yes) htmldocs=true ;;
164 no) htmldocs=false ;;
165 *) AC_MSG_ERROR(bad value ${enableval} for --enable-html-docs) ;;
166 esac],[htmldocs=true])
167 AM_CONDITIONAL(HTMLDOCS,test x$htmldocs = xtrue)
168
169 AC_ARG_ENABLE(html4-docs,
170 [ --enable-html4-docs Enable generation of HTML 4 docs (default: off)],
171 [case "${enableval}" in
172 yes) html4docs=true ;;
173 no) html4docs=false ;;
174 *) AC_MSG_ERROR(bad value ${enableval} for --enable-html4-docs) ;;
175 esac],[html4docs=false])
176 AM_CONDITIONAL(HTML4DOCS,test x$html4docs = xtrue)
177
178 AC_ARG_ENABLE(ascii-docs,
179 [ --enable-ascii-docs Enable generation of ASCII docs (default: off)],
180 [case "${enableval}" in
181 yes) asciidocs=true ;;
182 no) asciidocs=false ;;
183 *) AC_MSG_ERROR(bad value ${enableval} for --enable-ascii-docs) ;;
184 esac],[asciidocs=false])
185 AM_CONDITIONAL(ASCIIDOCS,test x$asciidocs = xtrue)
186
187 AC_ARG_ENABLE(rtf-docs,
188 [ --enable-rtf-docs Enable generation of RTF docs (default: off)],
189 [case "${enableval}" in
190 yes) rtfdocs=true ;;
191 no) rtfdocs=false ;;
192 *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;;
193 esac],[rtfdocs=false])
194 AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue)
195
196
197 AC_OUTPUT([Makefile compat/Makefile lib/Makefile psiconv/Makefile lib/general.h formats/Makefile docs/Makefile])

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26