/[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.2 - (show annotations)
Sat Feb 24 00:31:03 2001 UTC (16 years, 7 months ago) by bertho
Branch: MAIN
CVS Tags: REL_1_0_1
Changes since 1.1: +10 -5 lines
Updated configuration with config header
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 dnl Extra libraries 'with'-options
13 AC_ARG_WITH(gd,[ --with-gd=DIR location of the gd lib/inc],
14 [LDFLAGS="${LDFLAGS} -L${withval}"
15 CFLAGS="${CFLAGS} -I${withval}"
16 ])
17
18 AC_ARG_WITH(z,[ --with-z=DIR location of zlib lib/inc],
19 [LDFLAGS="${LDFLAGS} -L${withval}"
20 CFLAGS="${CFLAGS} -I${withval}"
21 ])
22
23 AC_ARG_WITH(png,[ --with-png=DIR location of png lib/inc],
24 [LDFLAGS="${LDFLAGS} -L${withval}"
25 CFLAGS="${CFLAGS} -I${withval}"
26 ])
27
28 LDFLAGS="${LDFLAGS} -lgd"
29
30
31 dnl Tests for gcc
32 if test "x${GCC}" = "xyes"
33 then
34 CFLAGS="$CFLAGS -Wall"
35 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
36 AC_TRY_RUN([
37 int main(void) {
38 static int Array[[3]];
39 unsigned int B = 3;
40 int i;
41 for(i=0; i<B; i++) Array[[i]] = i - 3;
42 exit( Array[[1]] != -2 );
43 }],
44 ac_cv_c_gcc_strength_bug="no",
45 ac_cv_c_gcc_strength_bug="yes",
46 ac_cv_c_gcc_strength_bug="yes") )
47 if test "$ac_cv_c_gcc_strength_bug" = "yes"
48 then
49 CFLAGS="$CFLAGS -fno-strength-reduce"
50 fi
51 fi
52
53
54 dnl Checks for libraries.
55 AC_CHECK_LIB(m, sqrt, [
56 AC_DEFINE(LIBM)
57 MATHLIBS="-lm" ])
58
59 dnl which version of gd do we have here? (taken from mrtg config)
60 AC_CHECK_LIB(gd,gdImageGif,[
61 AC_DEFINE(HAVE_IMAGE_GIF)
62 ])
63 AC_CHECK_LIB(gd,gdImagePng,[
64 AC_DEFINE(HAVE_IMAGE_PNG)
65 LDFLAGS="$LDFLAGS -lpng -lz ${MATHLIBS}"
66 ])
67 AC_CHECK_LIB(gd,gdImageJpeg,[
68 AC_DEFINE(HAVE_IMAGE_JPEG)
69 LDFLAGS="$LDFLAGS -ljpeg"
70 ])
71
72
73 dnl Make sure the header is here
74 AC_CHECK_HEADER( gd.h,[ have_gd_h="yes" ],[ have_gd_h="no" ])
75
76 if test $have_gd_h != "yes"; then
77 echo
78 echo "** The GD library is required for CvsGraph to function."
79 echo " Get it from http://www.boutell.com, compile it and"
80 echo " use either --with-gd-lib=DIR and --with-gd-inc=DIR to specify"
81 echo " its location. You might also have to use --with-z-inc, --with-z-lib"
82 echo " and --with-png-inc, --with-png-lib for gd versions 1.6 and higher."
83 echo " Check config.log for more information on the problem. If your system"
84 echo " has libgd installed, you probably mis the gd.h header file."
85 exit 1
86 fi
87
88
89 AC_OUTPUT(Makefile)
90
91 echo "Configure done. Run 'make' to build CvsGraph"
92

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0