/[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.7 - (hide annotations)
Wed Jan 9 00:28:36 2002 UTC (15 years, 9 months ago) by bertho
Branch: MAIN
CVS Tags: REL_1_2_0
Changes since 1.6: +14 -0 lines
- Added a new version of auto_stretch. It seems to work better
  bit it still needs improvement (a lot)
- Added TrueType support. This solves also a problem of missing
  libraries if libgd needs -lttf or -lfreetype.
1 bertho 1.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 bertho 1.2 AC_CONFIG_HEADER(config.h)
7 bertho 1.1
8     AC_PROG_CC
9     AC_PROG_LEX
10     AC_PROG_YACC
11    
12 bertho 1.3 LEXFLAGS="-8"
13     LEXSPEED="-Cf"
14 bertho 1.5 INCL=""
15 bertho 1.3
16 bertho 1.1 dnl Extra libraries 'with'-options
17 bertho 1.5 AC_ARG_WITH(gd-inc,[ --with-gd-inc=DIR location of the gd includes],
18     [INCL="${INCL} -I${withval}"
19 bertho 1.4 ])
20    
21 bertho 1.5 AC_ARG_WITH(gd-lib,[ --with-gd-lib=DIR location of the gd library],
22     [LIBS="${LIBS} -L${withval}"
23 bertho 1.1 ])
24    
25 bertho 1.5 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 bertho 1.4 ])
42    
43 bertho 1.5 AC_ARG_WITH(jpeg-inc,[ --with-jpeg-inc=DIR location of jpeg includes],
44     [INCL="${INCL} -I${withval}"
45 bertho 1.1 ])
46    
47 bertho 1.5 AC_ARG_WITH(jpeg-lib,[ --with-jpeg-lib=DIR location of jpeg library],
48     [LIBS="${LIBS} -L${withval} -ljpeg"
49 bertho 1.1 ])
50    
51 bertho 1.7 AC_ARG_WITH(freetype-lib,[ --with-freetype-lib=DIR location of freetype library],
52     [LIBS="${LIBS} -L${withval} -lttf"
53     ])
54    
55     AC_ARG_WITH(freetype2-lib,[ --with-freetype2-lib=DIR location of freetype2 library],
56     [LIBS="${LIBS} -L${withval} -lfreetype"
57     ])
58    
59 bertho 1.3 AC_ARG_ENABLE(speed,[ --disable-speed Turn off lex table optimization reducing speed and size of executable],
60     [if test "$enableval" = "no"; then LEXSPEED=""; fi])
61    
62     if test "x$LEXSPEED" != "x"
63     then
64     LEXFLAGS="$LEXFLAGS $LEXSPEED"
65     fi
66    
67 bertho 1.5 CPPFLAGS="$CPPFLAGS $INCL"
68     CFLAGS="$CFLAGS $INCL"
69 bertho 1.1
70     dnl Tests for gcc
71     if test "x${GCC}" = "xyes"
72     then
73     CFLAGS="$CFLAGS -Wall"
74     AC_CACHE_CHECK( "for gcc strength-reduce bug", ac_cv_c_gcc_strength_bug,
75     AC_TRY_RUN([
76     int main(void) {
77     static int Array[[3]];
78     unsigned int B = 3;
79     int i;
80     for(i=0; i<B; i++) Array[[i]] = i - 3;
81     exit( Array[[1]] != -2 );
82     }],
83     ac_cv_c_gcc_strength_bug="no",
84     ac_cv_c_gcc_strength_bug="yes",
85     ac_cv_c_gcc_strength_bug="yes") )
86     if test "$ac_cv_c_gcc_strength_bug" = "yes"
87     then
88     CFLAGS="$CFLAGS -fno-strength-reduce"
89     fi
90     fi
91    
92 bertho 1.6 dnl Check getopt.h because Solaris 8 doesn't have one
93     AC_CHECK_HEADER(getopt.h, [ AC_DEFINE(HAVE_GETOPT_H) ])
94 bertho 1.1
95     dnl Checks for libraries.
96     AC_CHECK_LIB(m, sqrt, [
97     AC_DEFINE(LIBM)
98     MATHLIBS="-lm" ])
99    
100     dnl which version of gd do we have here? (taken from mrtg config)
101     AC_CHECK_LIB(gd,gdImageGif,[
102 bertho 1.2 AC_DEFINE(HAVE_IMAGE_GIF)
103     ])
104 bertho 1.1 AC_CHECK_LIB(gd,gdImagePng,[
105 bertho 1.2 AC_DEFINE(HAVE_IMAGE_PNG)
106     ])
107     AC_CHECK_LIB(gd,gdImageJpeg,[
108     AC_DEFINE(HAVE_IMAGE_JPEG)
109 bertho 1.7 ])
110     AC_CHECK_LIB(gd,gdImageStringTTF,[
111     AC_DEFINE(HAVE_GDIMAGESTRINGTTF)
112     ])
113     AC_CHECK_LIB(gd,gdImageStringFT,[
114     AC_DEFINE(HAVE_GDIMAGESTRINGFT)
115 bertho 1.2 ])
116 bertho 1.1
117    
118     dnl Make sure the header is here
119     AC_CHECK_HEADER( gd.h,[ have_gd_h="yes" ],[ have_gd_h="no" ])
120    
121     if test $have_gd_h != "yes"; then
122     echo
123     echo "** The GD library is required for CvsGraph to function."
124     echo " Get it from http://www.boutell.com, compile it and"
125     echo " use either --with-gd-lib=DIR and --with-gd-inc=DIR to specify"
126     echo " its location. You might also have to use --with-z-inc, --with-z-lib"
127     echo " and --with-png-inc, --with-png-lib for gd versions 1.6 and higher."
128     echo " Check config.log for more information on the problem. If your system"
129     echo " has libgd installed, you probably mis the gd.h header file."
130     exit 1
131     fi
132    
133 bertho 1.3 AC_SUBST(LEXFLAGS)
134 bertho 1.1
135     AC_OUTPUT(Makefile)
136    
137     echo "Configure done. Run 'make' to build CvsGraph"
138    

  ViewVC Help
Powered by ViewVC 1.1.0 with CvsGraph 1.7.0