/[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.16 - (hide annotations)
Wed May 21 13:33:35 2008 UTC (9 years, 5 months ago) by bertho
Branch: MAIN
CVS Tags: merge_automake_dev1_20080521, REL_1_7_0, HEAD
Changes since 1.15: +84 -339 lines
Merge automake into head
1 bertho 1.16 # -*- Autoconf -*-
2     # Process this file with autoconf to produce a configure script.
3 bertho 1.1
4 bertho 1.16 #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     AC_CHECK_LIB(jpeg, jpeg_CreateCompress, GD_LIBS="-ljpeg $GD_LIBS", , $GD_LIBS)
30     fi
31    
32     save_CFLAGS="$CFLAGS"
33     CFLAGS="$GD_CFLAGS $CFLAGS"
34     save_LDFLAGS="$LDFLAGS"
35     LDFLAGS="$GD_LDFLAGS $LDFLAGS"
36     save_LIBS="$LIBS"
37     LIBS="$GD_LIBS $LIBS"
38    
39     AC_CHECK_LIB(gd, gdImageCreate, [
40     AC_DEFINE(HAVE_GD, 1, [ Define if you have gd library. ])
41     AC_CHECK_LIB(gd, gdImageGif, AC_DEFINE(HAVE_GD_GIF, 1, [ Define if GD supports gif. ]), , "$GD_LIBS")
42     AC_CHECK_LIB(gd, gdImageJpeg, AC_DEFINE(HAVE_GD_JPEG, 1, [ Define if GD supports jpeg. ]), , "$GD_LIBS")
43     AC_CHECK_LIB(gd, gdImagePng, AC_DEFINE(HAVE_GD_PNG, 1, [ Define if GD supports png. ]), , "$GD_LIBS")
44     AC_CHECK_LIB(gd, gdImagePngEx, AC_DEFINE(HAVE_GD_PNGEX, 1, [ Define if GD supports extended png. ]), , "$GD_LIBS")
45     AC_CHECK_LIB(gd, gdImageFilledArc, AC_DEFINE(HAVE_GD_FILLEDARC, 1, [ Define if GD supports filled arcs]), , "$GD_LIBS")
46 bertho 1.1
47 bertho 1.16 if test "$ac_cv_lib_freetype_FT_Load_Glyph" = "yes"
48     then
49     AC_CHECK_LIB(gd, gdImageStringFT, AC_DEFINE(HAVE_GD_STRINGFT, 1, [ Define if GD supports truetype lib v2]), , "$GD_LIBS")
50     fi
51     if test "$ac_cv_lib_ttf_TT_Load_Glyph" = "yes"
52 bertho 1.11 then
53 bertho 1.16 AC_CHECK_LIB(gd, gdImageStringTTF, AC_DEFINE(HAVE_GD_STRINGTTF, 1, [ Define if GD supports truetype lib v1]), , "$GD_LIBS")
54 bertho 1.11 fi
55 bertho 1.16 GD_LIBS="-lgd $GD_LIBS"
56     ], , $GD_LIBS)
57    
58     CFLAGS="$save_CFLAGS"
59     LDFLAGS="$save_LDFLAGS"
60     if test -n "$GDLIB_CONFIG"; then
61     LIBS="$GD_LIBS"
62 bertho 1.11 else
63 bertho 1.16 LIBS="$GD_LIBS $LIBS"
64 bertho 1.11 fi
65 bertho 1.16 AC_SUBST(GD_CFLAGS)
66     AC_SUBST(GD_LDFLAGS)
67     AC_SUBST(GD_LIBS)
68     ])
69 bertho 1.9
70 bertho 1.16 # Checks for programs.
71     AC_PROG_CC
72     AC_PROG_LEX
73     AC_PROG_YACC
74     AC_PATH_PROG(ac_prog_pkg_config, pkg-config)
75 bertho 1.13
76 bertho 1.16 AC_CHECK_LIB(m, sqrt)
77 bertho 1.9
78 bertho 1.16 AC_CHECK_LIB(freetype, FT_Load_Glyph)
79     if test "$ac_cv_lib_freetype_FT_Load_Glyph" != "yes"
80 bertho 1.8 then
81 bertho 1.16 AC_CHECK_LIB(ttf, TT_Load_Glyph)
82 bertho 1.9 fi
83    
84 bertho 1.16 # find out what the GD library uses
85     AX_CHECK_GD
86 bertho 1.1
87 bertho 1.16 # Checks for header files.
88     AC_HEADER_STDC
89     AC_CHECK_HEADERS([getopt.h sys/wait.h gd.h])
90 bertho 1.1
91 bertho 1.16 # Checks for typedefs, structures, and compiler characteristics.
92     AC_C_CONST
93     AC_C_INLINE
94     AC_TYPE_SIZE_T
95     AC_HEADER_TIME
96 bertho 1.1
97 bertho 1.16 # Checks for library functions.
98     AC_CHECK_FUNCS([memset strdup strtol])
99 bertho 1.1
100 bertho 1.16 AC_OUTPUT

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0