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

Diff of /psiconv/trunk/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 19 Revision 52
1dnl Process this file with autoconf to produce a configure script. 1dnl Process this file with autoconf to produce a configure script.
2AC_INIT(psiconv) 2AC_INIT(psiconv)
3AM_INIT_AUTOMAKE(psiconv,0.5.0a) 3AM_INIT_AUTOMAKE(psiconv,0.6.1)
4 4
5AM_CONFIG_HEADER(config.h) 5AM_CONFIG_HEADER(config.h)
6 6
7dnl Checks for programs. 7dnl Checks for programs.
8AM_PROG_LIBTOOL 8AM_PROG_LIBTOOL
9
10dnl This is stolen from gnome-libs-1.0.14
11AC_ARG_ENABLE(compile-warnings,
12[ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],
13,enable_compile_warnings=minimum)
14
15AC_MSG_CHECKING(what warning flags to pass to the C compiler)
16warnCFLAGS=
17if test "x$GCC" != xyes; then
18 enable_compile_warnings=no
19fi
20if 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
33fi
34AC_MSG_RESULT($warnCFLAGS)
35
36AC_ARG_ENABLE(iso-c,
37 [ --enable-iso-c Try to warn if code is not ISO C ],,
38 enable_iso_c=no)
39
40AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
41complCFLAGS=
42if 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
54fi
55AC_MSG_RESULT($complCFLAGS)
56if test "x$cflags_set" != "xyes"; then
57 CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
58 cflags_set=yes
59 AC_SUBST(cflags_set)
60fi
61
9 62
10dnl Checks for libraries. 63dnl Checks for libraries.
11AC_ARG_WITH(imagemagick, 64AC_ARG_WITH(imagemagick,
12 [ --with-imagemagick enable ImageMagick (default = yes)], 65 [ --with-imagemagick enable ImageMagick (default = yes)],
13 [IMAGEMAGICK=$withval], 66 [IMAGEMAGICK=$withval],
14 [IMAGEMAGICK='yes']) 67 [IMAGEMAGICK='yes'])
15if test x"$IMAGEMAGICK" != xno ; then 68if test x"$IMAGEMAGICK" != xno ; then
16 AC_CHECK_LIB(Magick,MagickWarning,IMAGEMAGICK=yes,IMAGEMAGICK=no) 69 AC_CHECK_LIB(Magick,ConstituteImage,IMAGEMAGICK=yes,IMAGEMAGICK=no)
70 if test x"$IMAGEMAGICK" != xno ; then
71 LIBS_SAVE="$LIBS"
72 LIBS="$LIBS -lMagick"
73 AC_MSG_CHECKING(whether GetMagickInfo works)
74 AC_TRY_RUN([ #include <magick/magick.h>
75 #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 IMAGEMAGICK=yes,IMAGEMAGICK=no,IMAGEMAGICK=yes)
82 AC_MSG_RESULT($IMAGEMAGICK)
83 LIBS="$LIBS_SAVE"
84 fi
17 if test x"$IMAGEMAGICK" = xno ; then 85 if test x"$IMAGEMAGICK" = xno ; then
18 AC_MSG_WARN(ImageMagick support disabled!) 86 AC_MSG_WARN(ImageMagick support disabled!)
19 fi 87 fi
20fi 88fi
21if test x"$IMAGEMAGICK" = xyes ; then 89if test x"$IMAGEMAGICK" = xyes ; then
97AC_SUBST(INT_16_BIT) 165AC_SUBST(INT_16_BIT)
98AC_SUBST(INT_32_BIT) 166AC_SUBST(INT_32_BIT)
99 167
100dnl Checks for library functions. 168dnl Checks for library functions.
101AC_FUNC_VPRINTF 169AC_FUNC_VPRINTF
102AC_CHECK_FUNCS(strdup)
103AC_REPLACE_FUNCS(strdup) 170AC_REPLACE_FUNCS(strdup)
171AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
172
104 173
105dnl With and without functions 174dnl With and without functions
106AC_ARG_ENABLE(html-docs, 175AC_ARG_ENABLE(html-docs,
107[ --disable-html-docs Disable generation of HTML 3.2 docs (default: on)], 176[ --disable-html-docs Disable generation of HTML 3.2 docs (default: on)],
108[case "${enableval}" in 177[case "${enableval}" in
137 no) rtfdocs=false ;; 206 no) rtfdocs=false ;;
138 *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;; 207 *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;;
139esac],[rtfdocs=false]) 208esac],[rtfdocs=false])
140AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue) 209AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue)
141 210
142dnl This is stolen from gnome-libs-1.0.14
143AC_ARG_ENABLE(compile-warnings,
144[ --enable-compile-warnings=[no/minimum/yes] Turn on compiler warnings.],
145,enable_compile_warnings=minimum)
146
147AC_MSG_CHECKING(what warning flags to pass to the C compiler)
148warnCFLAGS=
149if test "x$GCC" != xyes; then
150 enable_compile_warnings=no
151fi
152if test "x$enable_compile_warnings" != "xno"; then
153 if test "x$GCC" = "xyes"; then
154 case " $CFLAGS " in
155 *[\ \ ]-Wall[\ \ ]*) ;;
156 *) warnCFLAGS="-Wall -Wunused" ;;
157 esac
158
159 ## -W is not all that useful. And it cannot be controlled
160 ## with individual -Wno-xxx flags, unlike -Wall
161 if test "x$enable_compile_warnings" = "xyes"; then
162 warnCFLAGS="$warnCFLAGS -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith"
163 fi
164 fi
165fi
166AC_MSG_RESULT($warnCFLAGS)
167
168AC_ARG_ENABLE(iso-c,
169 [ --enable-iso-c Try to warn if code is not ISO C ],,
170 enable_iso_c=no)
171
172AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
173complCFLAGS=
174if test "x$enable_iso_c" != "xno"; then
175 if test "x$GCC" = "xyes"; then
176 case " $CFLAGS " in
177 *[\ \ ]-ansi[\ \ ]*) ;;
178 *) complCFLAGS="$complCFLAGS -ansi" ;;
179 esac
180
181 case " $CFLAGS " in
182 *[\ \ ]-pedantic[\ \ ]*) ;;
183 *) complCFLAGS="$complCFLAGS -pedantic" ;;
184 esac
185 fi
186fi
187AC_MSG_RESULT($complCFLAGS)
188if test "x$cflags_set" != "xyes"; then
189 CFLAGS="$CFLAGS $warnCFLAGS $complCFLAGS"
190 cflags_set=yes
191 AC_SUBST(cflags_set)
192fi
193 211
194AC_OUTPUT([Makefile compat/Makefile lib/Makefile psiconv/Makefile lib/general.h formats/Makefile docs/Makefile]) 212AC_OUTPUT([Makefile compat/Makefile lib/Makefile psiconv/Makefile lib/general.h formats/Makefile docs/Makefile])

Legend:
Removed from v.19  
changed lines
  Added in v.52

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