ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/configure.in
(Generate patch)

Comparing projects/libstatgrab/configure.in (file contents):
Revision 1.26 by ats, Thu Aug 28 11:27:39 2003 UTC vs.
Revision 1.38 by ats, Sun Oct 19 02:03:02 2003 UTC

# Line 6 | Line 6
6   #
7  
8   # Change these to change the package name and version
9 < AC_INIT(libstatgrab, 0.5.1, bugs@i-scream.org)
10 < AM_INIT_AUTOMAKE(libstatgrab, 0.5.1)
9 > AC_INIT(libstatgrab, 0.6.1, bugs@i-scream.org)
10 > AM_INIT_AUTOMAKE(libstatgrab, 0.6.1)
11  
12   # Revision number (automatically updated)
13   AC_REVISION($Revision$)
# Line 34 | Line 34 | AC_FUNC_MALLOC
34   AC_FUNC_REALLOC
35   AC_CHECK_FUNCS(atoll)
36  
37 + # Default needing setgid to false
38 + AM_CONDITIONAL(SETGIDBINS, false)
39 +
40   # Set things up for different OS's
41   # We define the name of the OS so the code can act accordingly
42   # We also need to add the right LDFLAGS
# Line 42 | Line 45 | solaris2.[[6-7]])
45          AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])])
46          AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
47          AC_DEFINE(SOL7, , [Building on Solaris 2.7])
48 <        LDFLAGS="$LDFLAGS -lkstat"
48 >        LINKFLAGS="-lkstat"
49          ;;
50   solaris2.*)
51          AC_CHECK_HEADERS([kstat.h],,[AC_MSG_ERROR([need kstat.h])])
52          AC_DEFINE(SOLARIS, , [Building on Solaris 2.x])
53 <        LDFLAGS="$LDFLAGS -lkstat"
53 >        LINKFLAGS="-lkstat"
54          ;;
55   freebsd4.*)
56 <        AC_DEFINE(FREEBSD, , [Building on FreeBSD 4.x])
57 <        LDFLAGS="$LDFLAGS -lkvm -ldevstat"
56 >        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
57 >        AC_DEFINE(FREEBSD, , [Building on FreeBSD])
58 >        AM_CONDITIONAL(SETGIDBINS, true)
59 >        LINKFLAGS="-lkvm -ldevstat"
60          ;;
61 + freebsd5.*)
62 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
63 +        AC_DEFINE(FREEBSD, , [Building on FreeBSD])
64 +        AC_DEFINE(FREEBSD5, , [Building on FreeBSD 5.x])
65 +        AM_CONDITIONAL(SETGIDBINS, true)
66 +        LINKFLAGS="-lkvm -ldevstat"
67 +        ;;
68 + netbsdelf1.*)
69 +        AC_DEFINE(ALLBSD, , [Building on a BSD-derived system])
70 +        AC_DEFINE(NETBSD, , [Building on NetBSD])
71 +        AM_CONDITIONAL(SETGIDBINS, true)
72 +        LINKFLAGS="-lkvm"
73 +        ;;
74   linux-gnu)
75          AC_DEFINE(LINUX, , [Building on GNU/Linux])
76          ;;
# Line 61 | Line 79 | linux-gnu)
79          ;;
80   esac
81  
82 + # User specified curses/ncurses prefix
83 + AC_ARG_WITH([curses-prefix],
84 +        [  --with-curses-prefix=PATH     curses (or ncurses) is in PATH],
85 +        [
86 +                if test -d "$withval/lib"; then
87 +                        SAIDARLIBS="-L${withval}/lib ${SAIDARLIBS}"
88 +                fi
89 +                if test -d "$withval/include"; then
90 +                        SAIDARCPPFLAGS="-I${withval}/include -I${withval}/include/ncurses ${SAIRDARCPPFLAGS}"
91 +                fi
92 +        ]
93 + )
94 +
95 + # Check if user wants to disable statgrab
96 + AM_CONDITIONAL(STATGRAB, true)
97 + AC_ARG_ENABLE(statgrab,
98 +        [  --disable-statgrab      disable building of statgrab],
99 +        [
100 +                if test "x$enableval" = "xno" ; then
101 +                        AM_CONDITIONAL(STATGRAB, false)
102 +                fi
103 +        ]
104 + )
105 +
106 + # Check if user wants to disable saidar
107 + AM_CONDITIONAL(SAIDAR, true)
108 + AC_ARG_ENABLE(saidar,
109 +        [  --disable-saidar        disable building of saidar],
110 +        [
111 +                if test "x$enableval" = "xno" ; then
112 +                        AM_CONDITIONAL(SAIDAR, false)
113 +                fi
114 +        ],
115 +        [
116 +                # saidar needs curses
117 +                # (if we don't find curses we disable saidar)
118 +                MP_WITH_CURSES
119 +        ]
120 + )
121 +
122 + # Check if the user would prefer not to build examples
123 + AM_CONDITIONAL(EXAMPLES, true)
124 + AC_ARG_ENABLE(examples,
125 +        [  --disable-examples      disable building of examples],
126 +        [
127 +                if test "x$enableval" = "xno" ; then
128 +                        AM_CONDITIONAL(EXAMPLES, false)
129 +                fi
130 +        ]
131 + )
132 +
133 + # Check if user wants to install manpages
134 + AM_CONDITIONAL(MANPAGES, true)
135 + AC_ARG_ENABLE(manpages,
136 +        [  --disable-manpages      disable installation of manpages],
137 +        [
138 +                if test "x$enableval" = "xno" ; then
139 +                        AM_CONDITIONAL(MANPAGES, false)
140 +                fi
141 +        ]
142 + )
143 +
144 + # Check if the user wants to turn off setgid binaries
145 + # (only really relevant on FreeBSD)
146 + AC_ARG_ENABLE(setgid-binaries,
147 +        [  --disable-setgid-binaries     disable binaries being setgid],
148 +        [
149 +                if test "x$enableval" = "xno" ; then
150 +                        AM_CONDITIONAL(SETGIDBINS, false)
151 +                fi
152 +        ]
153 + )
154 +
155 + # The LIBS and CPPFLAGS that saidar needs
156 + AC_SUBST(SAIDARLIBS)
157 + AC_SUBST(SAIDARCPPFLAGS)
158 +
159 + # The flags needed to link to libstatgrab
160 + # (ie. our dependencies)
161 + AC_SUBST(LINKFLAGS)
162 +
163   # And finish by changing these files
164 < AC_CONFIG_FILES([Makefile src/Makefile src/libstatgrab/Makefile src/statgrab/Makefile docs/Makefile examples/Makefile src/statgrab/statgrab-make-mrtg-config src/statgrab/statgrab-make-mrtg-index])
164 > AC_CONFIG_FILES([Makefile src/Makefile src/libstatgrab/Makefile src/statgrab/Makefile docs/Makefile examples/Makefile libstatgrab.pc src/statgrab/statgrab-make-mrtg-config src/statgrab/statgrab-make-mrtg-index src/saidar/Makefile])
165  
166   AC_OUTPUT

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines