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

Annotation of /psiconv/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 163 - (hide annotations)
Sat Nov 22 22:17:04 2003 UTC (20 years, 11 months ago) by frodo
File size: 7620 byte(s)
(Frodo) Some more work on objects:
  * Bumped up major library version
  * Corrected parsing of sketch_section, changed struct
  * parse_sketch_section does not have the is_object flag anymore

1 frodo 2 dnl Process this file with autoconf to produce a configure script.
2 frodo 116 AC_INIT
3     AC_CONFIG_SRCDIR([lib/psiconv])
4 frodo 163 AM_INIT_AUTOMAKE(psiconv,0.9.0)
5 frodo 2
6     AM_CONFIG_HEADER(config.h)
7    
8     dnl Checks for programs.
9     AM_PROG_LIBTOOL
10    
11 frodo 21 dnl This is stolen from gnome-libs-1.0.14
12     AC_ARG_ENABLE(compile-warnings,
13     [ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],
14     ,enable_compile_warnings=minimum)
15    
16     AC_MSG_CHECKING(what warning flags to pass to the C compiler)
17     warnCFLAGS=
18     if test "x$GCC" != xyes; then
19     enable_compile_warnings=no
20     fi
21     if test "x$enable_compile_warnings" != "xno"; then
22     if test "x$GCC" = "xyes"; then
23     case " $CFLAGS " in
24     *[\ \ ]-Wall[\ \ ]*) ;;
25     *) warnCFLAGS="-Wall -Wunused" ;;
26     esac
27    
28     ## -W is not all that useful. And it cannot be controlled
29     ## with individual -Wno-xxx flags, unlike -Wall
30     if test "x$enable_compile_warnings" = "xyes"; then
31     warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith"
32     fi
33     fi
34     fi
35     AC_MSG_RESULT($warnCFLAGS)
36    
37     AC_ARG_ENABLE(iso-c,
38     [ --enable-iso-c Try to warn if code is not ISO C ],,
39     enable_iso_c=no)
40    
41     AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
42     complCFLAGS=
43     if test "x$enable_iso_c" != "xno"; then
44     if test "x$GCC" = "xyes"; then
45     case " $CFLAGS " in
46     *[\ \ ]-ansi[\ \ ]*) ;;
47     *) complCFLAGS="$complCFLAGS -ansi" ;;
48     esac
49    
50     case " $CFLAGS " in
51     *[\ \ ]-pedantic[\ \ ]*) ;;
52     *) complCFLAGS="$complCFLAGS -pedantic" ;;
53     esac
54     fi
55     fi
56     AC_MSG_RESULT($complCFLAGS)
57     if test "x$cflags_set" != "xyes"; then
58     CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
59     cflags_set=yes
60     AC_SUBST(cflags_set)
61     fi
62    
63    
64 frodo 2 dnl Checks for libraries.
65 frodo 16 AC_ARG_WITH(imagemagick,
66     [ --with-imagemagick enable ImageMagick (default = yes)],
67     [IMAGEMAGICK=$withval],
68     [IMAGEMAGICK='yes'])
69     if test x"$IMAGEMAGICK" != xno ; then
70 frodo 53 AC_CHECK_PROG(IMAGEMAGICK,Magick-config,yes,no)
71 frodo 50 if test x"$IMAGEMAGICK" != xno ; then
72 frodo 53 CFLAGS_OLD="$CFLAGS"
73     CPPFLAGS_OLD="$CPPFLAGS"
74     LDFLAGS_OLD="$LDFLAGS"
75     LIBS_OLD="$LIBS"
76     CFLAGS="$CFLAGS `Magick-config --cflags`"
77     CPPFLAGS="$CPPFLAGS `Magick-config --cppflags`"
78     LDFLAGS="$LDFLAGS `Magick-config --ldflags`"
79     LIBS="$LIBS `Magick-config --libs`"
80    
81 frodo 152
82     AC_MSG_CHECKING(whether GetMagickInfo works and which API to use)
83     AC_TRY_RUN([ #include <stdio.h>
84     #include <magick/api.h>
85 frodo 118 int main(void) { ExceptionInfo exception;
86     GetExceptionInfo(&exception);
87     OpenModules(&exception);
88     return (NULL == GetMagickInfo(NULL,&exception)); }],
89 frodo 152 IMAGEMAGICK=new,IMAGEMAGICK=no,IMAGEMAGICK=no)
90     if test x"$IMAGEMAGICK" = xno ; then
91     AC_TRY_RUN([ #include <magick/magick.h>
92     int main(void) { ExceptionInfo exception;
93     GetExceptionInfo(&exception);
94     OpenModules(&exception);
95     return (NULL == GetMagickInfo(NULL,&exception)); }],
96     IMAGEMAGICK=old,IMAGEMAGICK=no,IMAGEMAGICK=no)
97     fi
98 frodo 50 AC_MSG_RESULT($IMAGEMAGICK)
99 frodo 53 LDFLAGS="$LDFLAGS_OLD"
100     LIBS="$LIBS_OLD"
101     dnl Note: CFLAGS can't be set for single directories, so we propagate them
102     if test x"$IMAGEMAGICK" = xno ; then
103     CFLAGS="$CFLAGS_OLD"
104     CPPFLAGS="$CPPFLAGS_OLD"
105     fi
106 frodo 50 fi
107 frodo 16 fi
108 frodo 152 if test x"$IMAGEMAGICK" != xno ; then
109 frodo 53 LIB_MAGICK="`Magick-config --libs` `Magick-config --ldflags`"
110 frodo 116 AC_DEFINE(IMAGEMAGICK,1,[ImageMagick availability])
111 frodo 152 if test x"$IMAGEMAGICK" = xold ; then
112     AC_DEFINE(IMAGEMAGICK_OLD,1,[ImageMagick old API version])
113     fi
114 frodo 16 else
115     LIB_MAGICK=
116     fi
117     AC_SUBST(LIB_MAGICK)
118 frodo 2
119     dnl Checks for header files.
120     AC_HEADER_STDC
121     AC_CHECK_HEADERS(unistd.h)
122    
123     dnl Checks for typedefs, structures, and compiler characteristics.
124     AC_C_CONST
125     AC_TYPE_SIZE_T
126    
127     dnl Here we check for large enough integer types. This is not quite
128     dnl good enough, but it should work almost always.
129    
130     AC_CHECK_SIZEOF(char,1)
131     AC_CHECK_SIZEOF(short,1)
132     AC_CHECK_SIZEOF(int,2)
133     AC_CHECK_SIZEOF(long,4)
134    
135     AC_MSG_CHECKING(for an 8 bit integer type)
136     if test $ac_cv_sizeof_char -ge 1 ; then
137     INT_8_BIT=char
138     AC_MSG_RESULT(char)
139     elif test $ac_cv_sizeof_short -ge 1 ; then
140     INT_8_BIT=short
141     AC_MSG_RESULT(short)
142     elif test $ac_cv_sizeof_int -ge 1 ; then
143     AC_MSG_RESULT(int)
144     elif test $ac_cv_sizeof_long -ge 1 ; then
145     INT_8_BIT=long
146     AC_MSG_RESULT(long)
147     else
148     AC_MSG_ERROR(No integer type of at least 8 bits found)
149     fi
150    
151     AC_MSG_CHECKING(for a 16 bit integer type)
152     if test $ac_cv_sizeof_char -ge 2 ; then
153     INT_16_BIT=char
154     AC_MSG_RESULT(char)
155     elif test $ac_cv_sizeof_short -ge 2 ; then
156     INT_16_BIT=short
157     AC_MSG_RESULT(short)
158     elif test $ac_cv_sizeof_int -ge 2 ; then
159     INT_16_BIT=int
160     AC_MSG_RESULT(int)
161     elif test $ac_cv_sizeof_long -ge 2 ; then
162     INT_16_BIT=long
163     AC_MSG_RESULT(long)
164     else
165     AC_MSG_ERROR(No integer type of at least 16 bits found)
166     fi
167    
168     AC_MSG_CHECKING(for a 32 bit integer type)
169     if test $ac_cv_sizeof_char -ge 4 ; then
170     INT_32_BIT=char
171     AC_MSG_RESULT(char)
172     elif test $ac_cv_sizeof_short -ge 4 ; then
173     INT_32_BIT=short
174     AC_MSG_RESULT(short)
175     elif test $ac_cv_sizeof_int -ge 4 ; then
176     INT_32_BIT=int
177     AC_MSG_RESULT(int)
178     elif test $ac_cv_sizeof_long -ge 4 ; then
179     INT_32_BIT=long
180     AC_MSG_RESULT(long)
181     else
182     AC_MSG_ERROR(No integer type of at least 32 bits found)
183     fi
184    
185     AC_SUBST(INT_8_BIT)
186     AC_SUBST(INT_16_BIT)
187     AC_SUBST(INT_32_BIT)
188    
189     dnl Checks for library functions.
190     AC_FUNC_VPRINTF
191     AC_REPLACE_FUNCS(strdup)
192 frodo 147 AC_CHECK_FUNCS(getopt_long,,AC_LIBOBJ([getopt]);AC_LIBOBJ([getopt1]))
193 frodo 2
194 frodo 142 AC_ARG_ENABLE(dmalloc,
195     [ --enable-dmalloc Enable dmalloc for developers (default:off)],
196     [case "${enableval}" in
197     yes) dmalloc=yes ;;
198     no) dmalloc=no ;;
199     *) AC_MSG_ERROR(bad value ${enableval} for --enable-dmalloc) ;;
200     esac],[dmalloc=false])
201     if test x"$dmalloc" = xyes; then
202     AC_CHECK_LIB(dmalloc,malloc,dmalloc=yes,dmalloc=no)
203     fi
204     if test x"$dmalloc" = xyes; then
205     AC_CHECK_HEADER(dmalloc.h,dmalloc=yes,dmalloc=no)
206     fi
207     if test x"$dmalloc" = xyes ; then
208     LIB_DMALLOC=-ldmalloc
209     AC_DEFINE(DMALLOC,1,[DMalloc availability])
210     else
211     LIB_DMALLOC=
212     fi
213     AC_SUBST(LIB_DMALLOC)
214 frodo 21
215 frodo 2 dnl With and without functions
216     AC_ARG_ENABLE(html-docs,
217     [ --disable-html-docs Disable generation of HTML 3.2 docs (default: on)],
218     [case "${enableval}" in
219     yes) htmldocs=true ;;
220     no) htmldocs=false ;;
221     *) AC_MSG_ERROR(bad value ${enableval} for --enable-html-docs) ;;
222     esac],[htmldocs=true])
223     AM_CONDITIONAL(HTMLDOCS,test x$htmldocs = xtrue)
224    
225     AC_ARG_ENABLE(html4-docs,
226     [ --enable-html4-docs Enable generation of HTML 4 docs (default: off)],
227     [case "${enableval}" in
228     yes) html4docs=true ;;
229     no) html4docs=false ;;
230     *) AC_MSG_ERROR(bad value ${enableval} for --enable-html4-docs) ;;
231     esac],[html4docs=false])
232     AM_CONDITIONAL(HTML4DOCS,test x$html4docs = xtrue)
233    
234     AC_ARG_ENABLE(ascii-docs,
235     [ --enable-ascii-docs Enable generation of ASCII docs (default: off)],
236     [case "${enableval}" in
237     yes) asciidocs=true ;;
238     no) asciidocs=false ;;
239     *) AC_MSG_ERROR(bad value ${enableval} for --enable-ascii-docs) ;;
240     esac],[asciidocs=false])
241     AM_CONDITIONAL(ASCIIDOCS,test x$asciidocs = xtrue)
242    
243 frodo 7 AC_ARG_ENABLE(rtf-docs,
244     [ --enable-rtf-docs Enable generation of RTF docs (default: off)],
245     [case "${enableval}" in
246     yes) rtfdocs=true ;;
247     no) rtfdocs=false ;;
248     *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;;
249     esac],[rtfdocs=false])
250     AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue)
251    
252 frodo 19
253 frodo 116 AC_CONFIG_FILES([Makefile compat/Makefile lib/Makefile lib/psiconv/Makefile program/Makefile program/psiconv/Makefile lib/psiconv/general.h formats/Makefile docs/Makefile extra/Makefile])
254     AC_OUTPUT

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