/[CvsGraph]/cvsgraph/configure.in
ViewVC logotype

Annotate of /cvsgraph/configure.in

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.15.4.1 - (show annotations)
Mon Nov 13 20:42:23 2006 UTC (11 years, 1 month ago) by bertho
Branch: automake-dev1
Changes since 1.15: +83 -339 lines
Changes to use automake
1 # -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 #AC_PREREQ(2.59)
5 AC_INIT(cvsgraph, 1.7.0, cvsgraph@akhphd.au.dk)
6 AM_INIT_AUTOMAKE
7 AC_CONFIG_SRCDIR([README])
8 AC_CONFIG_HEADER([config.h])
9 AC_CONFIG_FILES([Makefile contrib/Makefile cvsgraph.1 cvsgraph.conf.5 cvsgraph.spec contrib/mkimage.php contrib/cvsgraphwrapper.php ])
10
11 with_gd=yes
12
13 AC_DEFUN([AX_CHECK_GD], [
14 AC_ARG_WITH(gd,
15 AC_HELP_STRING([--with-gd(=DIR)], [use the gd library (in DIR)]),,
16 with_gd=yes)
17
18
19 AC_PATH_PROG(GDLIB_CONFIG, gdlib-config, , [$with_gd/bin:$PATH])
20 if test -n "$GDLIB_CONFIG"; then
21 GD_CFLAGS=`$GDLIB_CONFIG --cflags`
22 GD_LDFLAGS=`$GDLIB_CONFIG --ldflags`
23 GD_LIBS=`$GDLIB_CONFIG --libs`
24 elif test -d "$with_gd"; then
25 GD_CFLAGS="-I$with_gd/include"
26 GD_LDFLAGS="-L$with_gd/lib"
27 AC_CHECK_LIB(z, inflateReset, GD_LIBS="-lz")
28 AC_CHECK_LIB(png, png_check_sig, GD_LIBS="-lpng $GD_LIBS", , $GD_LIBS)
29 fi
30
31 save_CFLAGS="$CFLAGS"
32 CFLAGS="$GD_CFLAGS $CFLAGS"
33 save_LDFLAGS="$LDFLAGS"
34 LDFLAGS="$GD_LDFLAGS $LDFLAGS"
35 save_LIBS="$LIBS"
36 LIBS="$GD_LIBS $LIBS"
37
38 AC_CHECK_LIB(gd, gdImageCreate, [
39 AC_DEFINE(HAVE_GD, 1, [ Define if you have gd library. ])
40 AC_CHECK_LIB(gd, gdImageGif, AC_DEFINE(HAVE_GD_GIF, 1, [ Define if GD supports gif. ]), , "$GD_LIBS")
41 AC_CHECK_LIB(gd, gdImageJpeg, AC_DEFINE(HAVE_GD_JPEG, 1, [ Define if GD supports jpeg. ]), , "$GD_LIBS")
42 AC_CHECK_LIB(gd, gdImagePng, AC_DEFINE(HAVE_GD_PNG, 1, [ Define if GD supports png. ]), , "$GD_LIBS")
43 AC_CHECK_LIB(gd, gdImagePngEx, AC_DEFINE(HAVE_GD_PNGEX, 1, [ Define if GD supports extended png. ]), , "$GD_LIBS")
44 AC_CHECK_LIB(gd, gdImageFilledArc, AC_DEFINE(HAVE_GD_FILLEDARC, 1, [ Define if GD supports filled arcs]), , "$GD_LIBS")
45
46 if test "$ac_cv_lib_freetype_FT_Load_Glyph" = "yes"
47 then
48 AC_CHECK_LIB(gd, gdImageStringFT, AC_DEFINE(HAVE_GD_STRINGFT, 1, [ Define if GD supports truetype lib v2]), , "$GD_LIBS")
49 fi
50 if test "$ac_cv_lib_ttf_TT_Load_Glyph" = "yes"
51 then
52 AC_CHECK_LIB(gd, gdImageStringTTF, AC_DEFINE(HAVE_GD_STRINGTTF, 1, [ Define if GD supports truetype lib v1]), , "$GD_LIBS")
53 fi
54 GD_LIBS="-lgd $GD_LIBS"
55 ], , $GD_LIBS)
56
57 CFLAGS="$save_CFLAGS"
58 LDFLAGS="$save_LDFLAGS"
59 if test -n "$GDLIB_CONFIG"; then
60 LIBS="$GD_LIBS"
61 else
62 LIBS="$GD_LIBS $LIBS"
63 fi
64 AC_SUBST(GD_CFLAGS)
65 AC_SUBST(GD_LDFLAGS)
66 AC_SUBST(GD_LIBS)
67 ])
68
69 # Checks for programs.
70 AC_PROG_CC
71 AC_PROG_LEX
72 AC_PROG_YACC
73 AC_PATH_PROG(ac_prog_pkg_config, pkg-config)
74
75 AC_CHECK_LIB(m, sqrt)
76
77 AC_CHECK_LIB(freetype, FT_Load_Glyph)
78 if test "$ac_cv_lib_freetype_FT_Load_Glyph" != "yes"
79 then
80 AC_CHECK_LIB(ttf, TT_Load_Glyph)
81 fi
82
83 # find out what the GD library uses
84 AX_CHECK_GD
85
86 # Checks for header files.
87 AC_HEADER_STDC
88 AC_CHECK_HEADERS([getopt.h sys/wait.h gd.h])
89
90 # Checks for typedefs, structures, and compiler characteristics.
91 AC_C_CONST
92 AC_C_INLINE
93 AC_TYPE_SIZE_T
94 AC_HEADER_TIME
95
96 # Checks for library functions.
97 AC_CHECK_FUNCS([memset strdup strtol])
98
99 AC_OUTPUT

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0