/[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.6 - (show annotations)
Wed Nov 21 08:25:04 2001 UTC (16 years ago) by bertho
Branch: MAIN
Changes since 1.5: +2 -0 lines
Update configure to check for getopt.h which does not exist on Solaris 8.
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 INCL=""
15
16 dnl Extra libraries 'with'-options
17 AC_ARG_WITH(gd-inc,[ --with-gd-inc=DIR location of the gd includes],
18 [INCL="${INCL} -I${withval}"
19 ])
20
21 AC_ARG_WITH(gd-lib,[ --with-gd-lib=DIR location of the gd library],
22 [LIBS="${LIBS} -L${withval}"
23 ])
24
25 LIBS="$LIBS -lgd"
26
27 AC_ARG_WITH(z-inc,[ --with-z-inc=DIR location of zlib includes],
28 [INCL="${INCL} -I${withval}"
29 ])
30
31 AC_ARG_WITH(z-lib,[ --with-z-lib=DIR location of zlib library],
32 [LIBS="${LIBS} -L${withval} -lz"
33 ])
34
35 AC_ARG_WITH(png-inc,[ --with-png-inc=DIR location of png includes],
36 [INCL="${INCL} -I${withval}"
37 ])
38
39 AC_ARG_WITH(png-lib,[ --with-png-lib=DIR location of png library],
40 [LIBS="${LIBS} -L${withval} -lpng"
41 ])
42
43 AC_ARG_WITH(jpeg-inc,[ --with-jpeg-inc=DIR location of jpeg includes],
44 [INCL="${INCL} -I${withval}"
45 ])
46
47 AC_ARG_WITH(jpeg-lib,[ --with-jpeg-lib=DIR location of jpeg library],
48 [LIBS="${LIBS} -L${withval} -ljpeg"
49 ])
50
51 AC_ARG_ENABLE(speed,[ --disable-speed Turn off lex table optimization reducing speed and size of executable],
52 [if test "$enableval" = "no"; then LEXSPEED=""; fi])
53
54 if test "x$LEXSPEED" != "x"
55 then
56 LEXFLAGS="$LEXFLAGS $LEXSPEED"
57 fi
58
59 CPPFLAGS="$CPPFLAGS $INCL"
60 CFLAGS="$CFLAGS $INCL"
61
62 dnl Tests for gcc
63 if test "x${GCC}" = "xyes"
64 then
65 CFLAGS="$CFLAGS -Wall"
66 AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
67 AC_TRY_RUN([
68 int main(void) {
69 static int Array[[3]];
70 unsigned int B = 3;
71 int i;
72 for(i=0; i<B; i++) Array[[i]] = i - 3;
73 exit( Array[[1]] != -2 );
74 }],
75 ac_cv_c_gcc_strength_bug="no",
76 ac_cv_c_gcc_strength_bug="yes",
77 ac_cv_c_gcc_strength_bug="yes") )
78 if test "$ac_cv_c_gcc_strength_bug" = "yes"
79 then
80 CFLAGS="$CFLAGS -fno-strength-reduce"
81 fi
82 fi
83
84 dnl Check getopt.h because Solaris 8 doesn't have one
85 AC_CHECK_HEADER(getopt.h, [ AC_DEFINE(HAVE_GETOPT_H) ])
86
87 dnl Checks for libraries.
88 AC_CHECK_LIB(m, sqrt, [
89 AC_DEFINE(LIBM)
90 MATHLIBS="-lm" ])
91
92 dnl which version of gd do we have here? (taken from mrtg config)
93 AC_CHECK_LIB(gd,gdImageGif,[
94 AC_DEFINE(HAVE_IMAGE_GIF)
95 ])
96 AC_CHECK_LIB(gd,gdImagePng,[
97 AC_DEFINE(HAVE_IMAGE_PNG)
98 ])
99 AC_CHECK_LIB(gd,gdImageJpeg,[
100 AC_DEFINE(HAVE_IMAGE_JPEG)
101 ])
102
103
104 dnl Make sure the header is here
105 AC_CHECK_HEADER( gd.h,[ have_gd_h="yes" ],[ have_gd_h="no" ])
106
107 if test $have_gd_h != "yes"; then
108 echo
109 echo "** The GD library is required for CvsGraph to function."
110 echo " Get it from http://www.boutell.com, compile it and"
111 echo " use either --with-gd-lib=DIR and --with-gd-inc=DIR to specify"
112 echo " its location. You might also have to use --with-z-inc, --with-z-lib"
113 echo " and --with-png-inc, --with-png-lib for gd versions 1.6 and higher."
114 echo " Check config.log for more information on the problem. If your system"
115 echo " has libgd installed, you probably mis the gd.h header file."
116 exit 1
117 fi
118
119 AC_SUBST(LEXFLAGS)
120
121 AC_OUTPUT(Makefile)
122
123 echo "Configure done. Run 'make' to build CvsGraph"
124

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0