/[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 - (hide annotations)
Mon Nov 13 20:42:23 2006 UTC (10 years, 11 months ago) by bertho
Branch: automake-dev1
Changes since 1.15: +83 -339 lines
Changes to use automake
1 bertho 1.15.4.1 # -*- Autoconf -*-
2     # Process this file with autoconf to produce a configure script.
3 bertho 1.1
4 bertho 1.15.4.1 #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 bertho 1.1
46 bertho 1.15.4.1 if test "$ac_cv_lib_freetype_FT_Load_Glyph" = "yes"
47 bertho 1.11 then
48 bertho 1.15.4.1 AC_CHECK_LIB(gd, gdImageStringFT, AC_DEFINE(HAVE_GD_STRINGFT, 1, [ Define if GD supports truetype lib v2]), , "$GD_LIBS")
49 bertho 1.11 fi
50 bertho 1.15.4.1 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 bertho 1.9
57 bertho 1.15.4.1 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 bertho 1.9 fi
64 bertho 1.15.4.1 AC_SUBST(GD_CFLAGS)
65     AC_SUBST(GD_LDFLAGS)
66     AC_SUBST(GD_LIBS)
67     ])
68 bertho 1.9
69 bertho 1.15.4.1 # 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 bertho 1.9
75 bertho 1.15.4.1 AC_CHECK_LIB(m, sqrt)
76 bertho 1.9
77 bertho 1.15.4.1 AC_CHECK_LIB(freetype, FT_Load_Glyph)
78     if test "$ac_cv_lib_freetype_FT_Load_Glyph" != "yes"
79 bertho 1.9 then
80 bertho 1.15.4.1 AC_CHECK_LIB(ttf, TT_Load_Glyph)
81 bertho 1.8 fi
82    
83 bertho 1.15.4.1 # find out what the GD library uses
84     AX_CHECK_GD
85 bertho 1.1
86 bertho 1.15.4.1 # Checks for header files.
87     AC_HEADER_STDC
88     AC_CHECK_HEADERS([getopt.h sys/wait.h gd.h])
89 bertho 1.1
90 bertho 1.15.4.1 # 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 bertho 1.1
96 bertho 1.15.4.1 # Checks for library functions.
97     AC_CHECK_FUNCS([memset strdup strtol])
98 bertho 1.1
99 bertho 1.15.4.1 AC_OUTPUT

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0