ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/pyorbit/aclocal.m4
Revision: 1.1
Committed: Fri Oct 8 22:06:08 1999 UTC (16 years, 4 months ago) by justin
Branch: MAIN
CVS Tags: HEAD
Log Message:
I have autoconfed the build and install process.

Line File contents
1 dnl aclocal.m4 generated automatically by aclocal 1.4
2
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
7
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
12
13 # Like AC_CONFIG_HEADER, but automatically create stamp file.
14
15 AC_DEFUN(AM_CONFIG_HEADER,
16 [AC_PREREQ([2.12])
17 AC_CONFIG_HEADER([$1])
18 dnl When config.status generates a header, we must update the stamp-h file.
19 dnl This file resides in the same directory as the config header
20 dnl that is generated. We must strip everything past the first ":",
21 dnl and everything past the last "/".
22 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
23 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
24 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
25 <<am_indx=1
26 for am_file in <<$1>>; do
27 case " <<$>>CONFIG_HEADERS " in
28 *" <<$>>am_file "*<<)>>
29 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
30 ;;
31 esac
32 am_indx=`expr "<<$>>am_indx" + 1`
33 done<<>>dnl>>)
34 changequote([,]))])
35
36 # Do all the work for Automake. This macro actually does too much --
37 # some checks are only needed if your package does certain things.
38 # But this isn't really a big deal.
39
40 # serial 1
41
42 dnl Usage:
43 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
44
45 AC_DEFUN(AM_INIT_AUTOMAKE,
46 [AC_REQUIRE([AC_PROG_INSTALL])
47 PACKAGE=[$1]
48 AC_SUBST(PACKAGE)
49 VERSION=[$2]
50 AC_SUBST(VERSION)
51 dnl test to see if srcdir already configured
52 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
53 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
54 fi
55 ifelse([$3],,
56 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
57 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
58 AC_REQUIRE([AM_SANITY_CHECK])
59 AC_REQUIRE([AC_ARG_PROGRAM])
60 dnl FIXME This is truly gross.
61 missing_dir=`cd $ac_aux_dir && pwd`
62 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
63 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
64 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
65 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
66 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
67 AC_REQUIRE([AC_PROG_MAKE_SET])])
68
69 #
70 # Check to make sure that the build environment is sane.
71 #
72
73 AC_DEFUN(AM_SANITY_CHECK,
74 [AC_MSG_CHECKING([whether build environment is sane])
75 # Just in case
76 sleep 1
77 echo timestamp > conftestfile
78 # Do `set' in a subshell so we don't clobber the current shell's
79 # arguments. Must try -L first in case configure is actually a
80 # symlink; some systems play weird games with the mod time of symlinks
81 # (eg FreeBSD returns the mod time of the symlink's containing
82 # directory).
83 if (
84 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
85 if test "[$]*" = "X"; then
86 # -L didn't work.
87 set X `ls -t $srcdir/configure conftestfile`
88 fi
89 if test "[$]*" != "X $srcdir/configure conftestfile" \
90 && test "[$]*" != "X conftestfile $srcdir/configure"; then
91
92 # If neither matched, then we have a broken ls. This can happen
93 # if, for instance, CONFIG_SHELL is bash and it inherits a
94 # broken ls alias from the environment. This has actually
95 # happened. Such a system could not be considered "sane".
96 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
97 alias in your environment])
98 fi
99
100 test "[$]2" = conftestfile
101 )
102 then
103 # Ok.
104 :
105 else
106 AC_MSG_ERROR([newly created file is older than distributed files!
107 Check your system clock])
108 fi
109 rm -f conftest*
110 AC_MSG_RESULT(yes)])
111
112 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
113 dnl The program must properly implement --version.
114 AC_DEFUN(AM_MISSING_PROG,
115 [AC_MSG_CHECKING(for working $2)
116 # Run test in a subshell; some versions of sh will print an error if
117 # an executable is not found, even if stderr is redirected.
118 # Redirect stdin to placate older versions of autoconf. Sigh.
119 if ($2 --version) < /dev/null > /dev/null 2>&1; then
120 $1=$2
121 AC_MSG_RESULT(found)
122 else
123 $1="$3/missing $2"
124 AC_MSG_RESULT(missing)
125 fi
126 AC_SUBST($1)])
127
128
129 # serial 1
130
131 AC_DEFUN(AM_PATH_PYTHON,
132 [AC_CHECK_PROGS(PYTHON, python python1.5 python1.4 python1.3,no)
133 if test "$PYTHON" != no; then
134 AC_MSG_CHECKING([where .py files should go])
135 changequote(, )dnl
136 pythondir=`$PYTHON -c '
137 import sys
138 if sys.version[0] > "1" or sys.version[2] > "4":
139 print "%s/lib/python%s/site-packages" % (sys.prefix, sys.version[:3])
140 else:
141 print "%s/lib/python%s" % (sys.prefix, sys.version[:3])'`
142 changequote([, ])dnl
143 AC_MSG_RESULT($pythondir)
144 AC_MSG_CHECKING([where python extensions should go])
145 changequote(, )dnl
146 pyexecdir=`$PYTHON -c '
147 import sys
148 if sys.version[0] > "1" or sys.version[2] > "4":
149 print "%s/lib/python%s/site-packages" % (sys.exec_prefix, sys.version[:3])
150 else:
151 print "%s/lib/python%s/sharedmodules" % (sys.exec_prefix, sys.version[:3])'`
152 changequote([, ])dnl
153 AC_MSG_RESULT($pyexecdir)
154 else
155 # these defaults are version independent ...
156 AC_MSG_CHECKING([where .py files should go])
157 pythondir='$(prefix)/lib/site-python'
158 AC_MSG_RESULT($pythondir)
159 AC_MSG_CHECKING([where python extensions should go])
160 pyexecdir='$(exec_prefix)/lib/site-python'
161 AC_MSG_RESULT($pyexecdir)
162 fi
163 AC_SUBST(pythondir)
164 AC_SUBST(pyexecdir)])
165
166
167 dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]])
168 dnl Check if a module containing a given symbol is visible to python.
169 AC_DEFUN(AM_CHECK_PYMOD,
170 [AC_REQUIRE([AM_PATH_PYTHON])
171 py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
172 AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1)
173 AC_CACHE_VAL(py_cv_mod_$py_mod_var, [
174 ifelse([$2],[], [prog="
175 import sys
176 try:
177 import $1
178 except ImportError:
179 sys.exit(1)
180 except:
181 sys.exit(0)
182 sys.exit(0)"], [prog="
183 import $1
184 $1.$2"])
185 if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC
186 then
187 eval "py_cv_mod_$py_mod_var=yes"
188 else
189 eval "py_cv_mod_$py_mod_var=no"
190 fi
191 ])
192 py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"`
193 if test "x$py_val" != xno; then
194 AC_MSG_RESULT(yes)
195 ifelse([$3], [],, [$3
196 ])dnl
197 else
198 AC_MSG_RESULT(no)
199 ifelse([$4], [],, [$4
200 ])dnl
201 fi
202 ])
203
204
205
206
207 # serial 1
208
209 dnl finds information needed for compilation of shared library style python
210 dnl extensions. AM_PATH_PYTHON should be called before hand.
211 AC_DEFUN(AM_INIT_PYEXEC_MOD,
212 [AC_REQUIRE([AM_PATH_PYTHON])
213 AC_MSG_CHECKING([for python headers])
214 AC_CACHE_VAL(am_cv_python_includes,
215 [changequote(,)dnl
216 am_cv_python_includes="`$PYTHON -c '
217 import sys
218 includepy = \"%s/include/python%s\" % (sys.prefix, sys.version[:3])
219 if sys.version[0] > \"1\" or sys.version[2] > \"4\":
220 libpl = \"%s/include/python%s\" % (sys.exec_prefix, sys.version[:3])
221 else:
222 libpl = \"%s/lib/python%s/config\" % (sys.exec_prefix, sys.version[:3])
223 print \"-I%s -I%s\" % (includepy, libpl)'`"
224 changequote([, ])])
225 PYTHON_INCLUDES="$am_cv_python_includes"
226 AC_MSG_RESULT(found)
227 AC_SUBST(PYTHON_INCLUDES)
228
229 AC_MSG_CHECKING([definitions from Python makefile])
230 AC_CACHE_VAL(am_cv_python_makefile,
231 [changequote(,)dnl
232 py_makefile="`$PYTHON -c '
233 import sys
234 print \"%s/lib/python%s/config/Makefile\"%(sys.exec_prefix, sys.version[:3])'`"
235 if test ! -f "$py_makefile"; then
236 AC_MSG_ERROR([*** Couldn't find the python config makefile. Maybe you are
237 *** missing the development portion of the python installation])
238 fi
239 eval `sed -n \
240 -e "s/^CC=[ ]*\(.*\)/am_cv_python_CC='\1'/p" \
241 -e "s/^OPT=[ ]*\(.*\)/am_cv_python_OPT='\1'/p" \
242 -e "s/^CCSHARED=[ ]*\(.*\)/am_cv_python_CCSHARED='\1'/p" \
243 -e "s/^LDSHARED=[ ]*\(.*\)/am_cv_python_LDSHARED='\1'/p" \
244 -e "s/^SO=[ ]*\(.*\)/am_cv_python_SO='\1'/p" \
245 $py_makefile`
246 am_cv_python_makefile=found
247 changequote([, ])])
248 AC_MSG_RESULT(done)
249 CC="$am_cv_python_CC"
250 OPT="$am_cv_python_OPT"
251 SO="$am_cv_python_SO"
252 PYTHON_CFLAGS="$am_cv_python_CCSHARED \$(OPT)"
253 PYTHON_LINK="$am_cv_python_LDSHARED -o \[$]@"
254
255 AC_SUBST(CC)dnl
256 AC_SUBST(OPT)dnl
257 AC_SUBST(SO)dnl
258 AC_SUBST(PYTHON_CFLAGS)dnl
259 AC_SUBST(PYTHON_LINK)])
260
261
262 # Add --enable-maintainer-mode option to configure.
263 # From Jim Meyering
264
265 # serial 1
266
267 AC_DEFUN(AM_MAINTAINER_MODE,
268 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
269 dnl maintainer-mode is disabled by default
270 AC_ARG_ENABLE(maintainer-mode,
271 [ --enable-maintainer-mode enable make rules and dependencies not useful
272 (and sometimes confusing) to the casual installer],
273 USE_MAINTAINER_MODE=$enableval,
274 USE_MAINTAINER_MODE=no)
275 AC_MSG_RESULT($USE_MAINTAINER_MODE)
276 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
277 MAINT=$MAINTAINER_MODE_TRUE
278 AC_SUBST(MAINT)dnl
279 ]
280 )
281
282 # Define a conditional.
283
284 AC_DEFUN(AM_CONDITIONAL,
285 [AC_SUBST($1_TRUE)
286 AC_SUBST($1_FALSE)
287 if $2; then
288 $1_TRUE=
289 $1_FALSE='#'
290 else
291 $1_TRUE='#'
292 $1_FALSE=
293 fi])
294
295 dnl
296 dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag)
297 dnl
298 dnl if failflag is "failure" it aborts if orbit is not found.
299 dnl
300
301 AC_DEFUN([GNOME_ORBIT_HOOK],[
302 AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no)
303 AC_PATH_PROG(ORBIT_IDL,orbit-idl,no)
304 AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[
305 if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then
306 gnome_cv_orbit_found=no
307 else
308 gnome_cv_orbit_found=yes
309 fi
310 ])
311 AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes)
312 if test x$gnome_cv_orbit_found = xyes; then
313 $1
314 ORBIT_CFLAGS=`orbit-config --cflags client server`
315 ORBIT_LIBS=`orbit-config --use-service=name --libs client server`
316 AC_SUBST(ORBIT_CFLAGS)
317 AC_SUBST(ORBIT_LIBS)
318 else
319 if test x$2 = xfailure; then
320 AC_MSG_ERROR(ORBit not installed or installation problem)
321 fi
322 fi
323 ])
324
325 AC_DEFUN([GNOME_ORBIT_CHECK], [
326 GNOME_ORBIT_HOOK([],failure)
327 ])