/[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.3 - (show annotations)
Sun Mar 4 01:38:23 2001 UTC (16 years, 8 months ago) by bertho
Branch: MAIN
Changes since 1.2: +12 -0 lines
Major update of the code.
- Complete new method of getting the revision structure by directly
  reading the rcs/cvs file. This should also speed things a bit
  because no external program needs to be called anymore.
  This also means that "remote-graphs" are no longer a possible
  extension of the program. But, who cares.
- Implemented branch-kerning to save place. The images are now
  much smaller in width, dependent on the settings of the exterior
  margins.
- Fixed disjoint braches by reading the structure direct from the
  rcs/cvs file. The revision/branch structure is no longer determined
  from the revision numbers, but solely from the rcs/cvs file structure.
- Fixed display of branches with no revisions attached to them. These
  only have a tag describing the new branch.
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=DIR location of the gd lib/inc],
17 [LDFLAGS="${LDFLAGS} -L${withval}"
18 CFLAGS="${CFLAGS} -I${withval}"
19 ])
20
21 AC_ARG_WITH(z,[ --with-z=DIR location of zlib lib/inc],
22 [LDFLAGS="${LDFLAGS} -L${withval}"
23 CFLAGS="${CFLAGS} -I${withval}"
24 ])
25
26 AC_ARG_WITH(png,[ --with-png=DIR location of png lib/inc],
27 [LDFLAGS="${LDFLAGS} -L${withval}"
28 CFLAGS="${CFLAGS} -I${withval}"
29 ])
30
31 AC_ARG_ENABLE(speed,[ --disable-speed Turn off lex table optimization reducing speed and size of executable],
32 [if test "$enableval" = "no"; then LEXSPEED=""; fi])
33
34 if test "x$LEXSPEED" != "x"
35 then
36 LEXFLAGS="$LEXFLAGS $LEXSPEED"
37 fi
38
39 LDFLAGS="${LDFLAGS} -lgd"
40
41
42 dnl Tests for gcc
43 if test "x${GCC}" = "xyes"
44 then
45 CFLAGS="$CFLAGS -Wall"
46 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
47 AC_TRY_RUN([
48 int main(void) {
49 static int Array[[3]];
50 unsigned int B = 3;
51 int i;
52 for(i=0; i<B; i++) Array[[i]] = i - 3;
53 exit( Array[[1]] != -2 );
54 }],
55 ac_cv_c_gcc_strength_bug="no",
56 ac_cv_c_gcc_strength_bug="yes",
57 ac_cv_c_gcc_strength_bug="yes") )
58 if test "$ac_cv_c_gcc_strength_bug" = "yes"
59 then
60 CFLAGS="$CFLAGS -fno-strength-reduce"
61 fi
62 fi
63
64
65 dnl Checks for libraries.
66 AC_CHECK_LIB(m, sqrt, [
67 AC_DEFINE(LIBM)
68 MATHLIBS="-lm" ])
69
70 dnl which version of gd do we have here? (taken from mrtg config)
71 AC_CHECK_LIB(gd,gdImageGif,[
72 AC_DEFINE(HAVE_IMAGE_GIF)
73 ])
74 AC_CHECK_LIB(gd,gdImagePng,[
75 AC_DEFINE(HAVE_IMAGE_PNG)
76 LDFLAGS="$LDFLAGS -lpng -lz ${MATHLIBS}"
77 ])
78 AC_CHECK_LIB(gd,gdImageJpeg,[
79 AC_DEFINE(HAVE_IMAGE_JPEG)
80 LDFLAGS="$LDFLAGS -ljpeg"
81 ])
82
83
84 dnl Make sure the header is here
85 AC_CHECK_HEADER( gd.h,[ have_gd_h="yes" ],[ have_gd_h="no" ])
86
87 if test $have_gd_h != "yes"; then
88 echo
89 echo "** The GD library is required for CvsGraph to function."
90 echo " Get it from http://www.boutell.com, compile it and"
91 echo " use either --with-gd-lib=DIR and --with-gd-inc=DIR to specify"
92 echo " its location. You might also have to use --with-z-inc, --with-z-lib"
93 echo " and --with-png-inc, --with-png-lib for gd versions 1.6 and higher."
94 echo " Check config.log for more information on the problem. If your system"
95 echo " has libgd installed, you probably mis the gd.h header file."
96 exit 1
97 fi
98
99 AC_SUBST(LEXFLAGS)
100
101 AC_OUTPUT(Makefile)
102
103 echo "Configure done. Run 'make' to build CvsGraph"
104

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0