/[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.4 - (show annotations)
Sun Mar 4 20:15:02 2001 UTC (16 years, 7 months ago) by bertho
Branch: MAIN
CVS Tags: REL_1_1_1, REL_1_1_0
Changes since 1.3: +12 -6 lines
Updated configure to accept separate include/lib dirs for gd
1 dnl Configure.in script for CvsGraph
2 dnl Most of the stuff is gathered from other
3 dnl scripts that seem to do a pretty good job.
4
5 AC_INIT(cvsgraph.c)
6 AC_CONFIG_HEADER(config.h)
7
8 AC_PROG_CC
9 AC_PROG_LEX
10 AC_PROG_YACC
11
12 LEXFLAGS="-8"
13 LEXSPEED="-Cf"
14
15 dnl Extra libraries 'with'-options
16 AC_ARG_WITH(gd,[ --with-gd-inc=DIR location of the gd includes],
17 [CFLAGS="${CFLAGS} -I${withval}"
18 ])
19
20 AC_ARG_WITH(gd,[ --with-gd-lib=DIR location of the gd library],
21 [LDFLAGS="${LDFLAGS} -L${withval}"
22 ])
23
24 AC_ARG_WITH(z,[ --with-z-inc=DIR location of zlib includes],
25 [CFLAGS="${CFLAGS} -I${withval}"
26 ])
27
28 AC_ARG_WITH(z,[ --with-z-lib=DIR location of zlib library],
29 [LDFLAGS="${LDFLAGS} -L${withval} -lz"
30 ])
31
32 AC_ARG_WITH(png,[ --with-png=DIR location of png lib/inc],
33 [LDFLAGS="${LDFLAGS} -L${withval} -lpng"
34 CFLAGS="${CFLAGS} -I${withval}"
35 ])
36
37 AC_ARG_ENABLE(speed,[ --disable-speed Turn off lex table optimization reducing speed and size of executable],
38 [if test "$enableval" = "no"; then LEXSPEED=""; fi])
39
40 if test "x$LEXSPEED" != "x"
41 then
42 LEXFLAGS="$LEXFLAGS $LEXSPEED"
43 fi
44
45 LDFLAGS="${LDFLAGS} -lgd"
46
47
48 dnl Tests for gcc
49 if test "x${GCC}" = "xyes"
50 then
51 CFLAGS="$CFLAGS -Wall"
52 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
53 AC_TRY_RUN([
54 int main(void) {
55 static int Array[[3]];
56 unsigned int B = 3;
57 int i;
58 for(i=0; i<B; i++) Array[[i]] = i - 3;
59 exit( Array[[1]] != -2 );
60 }],
61 ac_cv_c_gcc_strength_bug="no",
62 ac_cv_c_gcc_strength_bug="yes",
63 ac_cv_c_gcc_strength_bug="yes") )
64 if test "$ac_cv_c_gcc_strength_bug" = "yes"
65 then
66 CFLAGS="$CFLAGS -fno-strength-reduce"
67 fi
68 fi
69
70
71 dnl Checks for libraries.
72 AC_CHECK_LIB(m, sqrt, [
73 AC_DEFINE(LIBM)
74 MATHLIBS="-lm" ])
75
76 dnl which version of gd do we have here? (taken from mrtg config)
77 AC_CHECK_LIB(gd,gdImageGif,[
78 AC_DEFINE(HAVE_IMAGE_GIF)
79 ])
80 AC_CHECK_LIB(gd,gdImagePng,[
81 AC_DEFINE(HAVE_IMAGE_PNG)
82 LDFLAGS="$LDFLAGS -lpng -lz ${MATHLIBS}"
83 ])
84 AC_CHECK_LIB(gd,gdImageJpeg,[
85 AC_DEFINE(HAVE_IMAGE_JPEG)
86 LDFLAGS="$LDFLAGS -ljpeg"
87 ])
88
89
90 dnl Make sure the header is here
91 AC_CHECK_HEADER( gd.h,[ have_gd_h="yes" ],[ have_gd_h="no" ])
92
93 if test $have_gd_h != "yes"; then
94 echo
95 echo "** The GD library is required for CvsGraph to function."
96 echo " Get it from http://www.boutell.com, compile it and"
97 echo " use either --with-gd-lib=DIR and --with-gd-inc=DIR to specify"
98 echo " its location. You might also have to use --with-z-inc, --with-z-lib"
99 echo " and --with-png-inc, --with-png-lib for gd versions 1.6 and higher."
100 echo " Check config.log for more information on the problem. If your system"
101 echo " has libgd installed, you probably mis the gd.h header file."
102 exit 1
103 fi
104
105 AC_SUBST(LEXFLAGS)
106
107 AC_OUTPUT(Makefile)
108
109 echo "Configure done. Run 'make' to build CvsGraph"
110

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0