/[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 15 Revision 50
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 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
62
10dnl Checks for libraries. 63dnl Checks for libraries.
64AC_ARG_WITH(imagemagick,
65 [ --with-imagemagick enable ImageMagick (default = yes)],
66 [IMAGEMAGICK=$withval],
67 [IMAGEMAGICK='yes'])
68if 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_CHECKING(whether GetMagickInfo works)
72 AC_TRY_RUN([ #include <magick/magick.h>
73 int main(void) { return (NULL == GetMagickInfo(NULL)) }],
74 IMAGEMAGICK=yes,IMAGEMAGICK=no,IMAGEMAGICK=yes)
75 AC_MSG_RESULT($IMAGEMAGICK)
76 fi
77 if test x"$IMAGEMAGICK" = xno ; then
78 AC_MSG_WARN(ImageMagick support disabled!)
79 fi
80fi
81if test x"$IMAGEMAGICK" = xyes ; then
82 LIB_MAGICK=-lMagick
83 AC_DEFINE(IMAGEMAGICK)
84else
85 LIB_MAGICK=
86fi
87AC_SUBST(LIB_MAGICK)
11 88
12dnl Checks for header files. 89dnl Checks for header files.
13AC_HEADER_STDC 90AC_HEADER_STDC
14AC_CHECK_HEADERS(unistd.h) 91AC_CHECK_HEADERS(unistd.h)
15 92
80AC_SUBST(INT_16_BIT) 157AC_SUBST(INT_16_BIT)
81AC_SUBST(INT_32_BIT) 158AC_SUBST(INT_32_BIT)
82 159
83dnl Checks for library functions. 160dnl Checks for library functions.
84AC_FUNC_VPRINTF 161AC_FUNC_VPRINTF
85AC_CHECK_FUNCS(strdup)
86AC_REPLACE_FUNCS(strdup) 162AC_REPLACE_FUNCS(strdup)
163AC_CHECK_FUNCS(getopt_long,,LIBOBJS="$LIBOBJS getopt.o getopt1.o")
164
87 165
88dnl With and without functions 166dnl With and without functions
89AC_ARG_ENABLE(html-docs, 167AC_ARG_ENABLE(html-docs,
90[ --disable-html-docs Disable generation of HTML 3.2 docs (default: on)], 168[ --disable-html-docs Disable generation of HTML 3.2 docs (default: on)],
91[case "${enableval}" in 169[case "${enableval}" in
120 no) rtfdocs=false ;; 198 no) rtfdocs=false ;;
121 *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;; 199 *) AC_MSG_ERROR(bad value ${enableval} for --enable-rtf-docs) ;;
122esac],[rtfdocs=false]) 200esac],[rtfdocs=false])
123AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue) 201AM_CONDITIONAL(RTFDOCS,test x$rtfdocs = xtrue)
124 202
203
125AC_OUTPUT([Makefile compat/Makefile lib/Makefile psiconv/Makefile lib/general.h formats/Makefile docs/Makefile]) 204AC_OUTPUT([Makefile compat/Makefile lib/Makefile psiconv/Makefile lib/general.h formats/Makefile docs/Makefile])

Legend:
Removed from v.15  
changed lines
  Added in v.50

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