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

Annotation of /psiconv/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 52 - (hide annotations)
Wed Oct 4 19:02:04 2000 UTC (24 years, 1 month ago) by frodo
File size: 6053 byte(s)
(Frodo) Now finally ImageMagick 5 works correctly.

1 frodo 2 dnl Process this file with autoconf to produce a configure script.
2     AC_INIT(psiconv)
3 frodo 46 AM_INIT_AUTOMAKE(psiconv,0.6.1)
4 frodo 2
5     AM_CONFIG_HEADER(config.h)
6    
7     dnl Checks for programs.
8     AM_PROG_LIBTOOL
9    
10 frodo 21 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 frodo 2 dnl Checks for libraries.
64 frodo 16 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 frodo 49 AC_CHECK_LIB(Magick,ConstituteImage,IMAGEMAGICK=yes,IMAGEMAGICK=no)
70 frodo 50 if test x"$IMAGEMAGICK" != xno ; then
71 frodo 52 LIBS_SAVE="$LIBS"
72     LIBS="$LIBS -lMagick"
73 frodo 50 AC_MSG_CHECKING(whether GetMagickInfo works)
74     AC_TRY_RUN([ #include <magick/magick.h>
75 frodo 52 #include <stdio.h>
76     int main(void) { MagickInfo *mi;GetMagickInfo(NULL);
77     #if defined(HasLTDL)
78     OpenModules();
79     #endif
80     return (NULL != GetMagickInfo(NULL)); }],
81 frodo 50 IMAGEMAGICK=yes,IMAGEMAGICK=no,IMAGEMAGICK=yes)
82     AC_MSG_RESULT($IMAGEMAGICK)
83 frodo 52 LIBS="$LIBS_SAVE"
84 frodo 50 fi
85 frodo 16 if test x"$IMAGEMAGICK" = xno ; then
86     AC_MSG_WARN(ImageMagick support disabled!)
87     fi
88     fi
89     if test x"$IMAGEMAGICK" = xyes ; then
90     LIB_MAGICK=-lMagick
91     AC_DEFINE(IMAGEMAGICK)
92     else
93     LIB_MAGICK=
94     fi
95     AC_SUBST(LIB_MAGICK)
96 frodo 2
97     dnl Checks for header files.
98     AC_HEADER_STDC
99     AC_CHECK_HEADERS(unistd.h)
100    
101     dnl Checks for typedefs, structures, and compiler characteristics.
102     AC_C_CONST
103     AC_TYPE_SIZE_T
104    
105     dnl Here we check for large enough integer types. This is not quite
106     dnl good enough, but it should work almost always.
107    
108     AC_CHECK_SIZEOF(char,1)
109     AC_CHECK_SIZEOF(short,1)
110     AC_CHECK_SIZEOF(int,2)
111     AC_CHECK_SIZEOF(long,4)
112    
113     AC_MSG_CHECKING(for an 8 bit integer type)
114     if test $ac_cv_sizeof_char -ge 1 ; then
115     INT_8_BIT=char
116     AC_MSG_RESULT(char)
117     elif test $ac_cv_sizeof_short -ge 1 ; then
118     INT_8_BIT=short
119     AC_MSG_RESULT(short)
120     elif test $ac_cv_sizeof_int -ge 1 ; then
121     INT_8_BIT=int
122     AC_MSG_RESULT(int)
123     elif test $ac_cv_sizeof_long -ge 1 ; then
124     INT_8_BIT=long
125     AC_MSG_RESULT(long)
126     else
127     AC_MSG_ERROR(No integer type of at least 8 bits found)
128     fi
129    
130     AC_MSG_CHECKING(for a 16 bit integer type)
131     if test $ac_cv_sizeof_char -ge 2 ; then
132     INT_16_BIT=char
133     AC_MSG_RESULT(char)
134     elif test $ac_cv_sizeof_short -ge 2 ; then
135     INT_16_BIT=short
136     AC_MSG_RESULT(short)
137     elif test $ac_cv_sizeof_int -ge 2 ; then
138     INT_16_BIT=int
139     AC_MSG_RESULT(int)
140     elif test $ac_cv_sizeof_long -ge 2 ; then
141     INT_16_BIT=long
142     AC_MSG_RESULT(long)
143     else
144     AC_MSG_ERROR(No integer type of at least 16 bits found)
145     fi
146    
147     AC_MSG_CHECKING(for a 32 bit integer type)
148     if test $ac_cv_sizeof_char -ge 4 ; then
149     INT_32_BIT=char
150     AC_MSG_RESULT(char)
151     elif test $ac_cv_sizeof_short -ge 4 ; then
152     INT_32_BIT=short
153     AC_MSG_RESULT(short)
154     elif test $ac_cv_sizeof_int -ge 4 ; then
155     INT_32_BIT=int
156     AC_MSG_RESULT(int)
157     elif test $ac_cv_sizeof_long -ge 4 ; then
158     INT_32_BIT=long
159     AC_MSG_RESULT(long)
160     else
161     AC_MSG_ERROR(No integer type of at least 32 bits found)
162     fi
163    
164     AC_SUBST(INT_8_BIT)
165     AC_SUBST(INT_16_BIT)
166     AC_SUBST(INT_32_BIT)
167    
168     dnl Checks for library functions.
169     AC_FUNC_VPRINTF
170     AC_REPLACE_FUNCS(strdup)
171 frodo 21 AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
172 frodo 2
173 frodo 21
174 frodo 2 dnl With and without functions
175     AC_ARG_ENABLE(html-docs,
176     [ --disable-html-docs Disable generation of HTML 3.2 docs (default: on)],
177     [case "${enableval}" in
178     yes) htmldocs=true ;;
179     no) htmldocs=false ;;
180     *) AC_MSG_ERROR(bad value ${enableval} for --enable-html-docs) ;;
181     esac],[htmldocs=true])
182     AM_CONDITIONAL(HTMLDOCS,test x$htmldocs = xtrue)
183    
184     AC_ARG_ENABLE(html4-docs,
185     [ --enable-html4-docs Enable generation of HTML 4 docs (default: off)],
186     [case "${enableval}" in
187     yes) html4docs=true ;;
188     no) html4docs=false ;;
189     *) AC_MSG_ERROR(bad value ${enableval} for --enable-html4-docs) ;;
190     esac],[html4docs=false])
191     AM_CONDITIONAL(HTML4DOCS,test x$html4docs = xtrue)
192    
193     AC_ARG_ENABLE(ascii-docs,
194     [ --enable-ascii-docs Enable generation of ASCII docs (default: off)],
195     [case "${enableval}" in
196     yes) asciidocs=true ;;
197     no) asciidocs=false ;;
198     *) AC_MSG_ERROR(bad value ${enableval} for --enable-ascii-docs) ;;
199     esac],[asciidocs=false])
200     AM_CONDITIONAL(ASCIIDOCS,test x$asciidocs = xtrue)
201    
202 frodo 7 AC_ARG_ENABLE(rtf-docs,
203     [ --enable-rtf-docs Enable generation of RTF docs (default: off)],
204     [case "${enableval}" in
205     yes) rtfdocs=true ;;
206     no) rtfdocs=false ;;
207     *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;;
208     esac],[rtfdocs=false])
209     AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue)
210    
211 frodo 19
212 frodo 2 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