]> git.draconx.ca Git - gob-dx.git/blob - configure.in
0359f69b832451a9ed42f28d70a1d9c5431a7b86
[gob-dx.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ(2.2)
3 AC_INIT(src/treefuncs.h)
4 AM_CONFIG_HEADER(config.h)
5 AM_INIT_AUTOMAKE(gob2,2.0.12)
6 AM_MAINTAINER_MODE
7
8 GLIB_REQUIRED=2.0.0
9
10 dnl
11 dnl  An utter hack to allow embedding of gob inside other packages.
12 dnl  if a file is found in the parent directory named NOINST_GOB, then
13 dnl  gob is not installed
14 dnl
15
16 AM_CONDITIONAL(NOINSTGOB, test -f ../NOINST_GOB)
17
18 dnl Is there a way to test NOINSTGOB here ?
19 if test -f ../NOINST_GOB ; then
20   AC_MSG_RESULT([*** NOT Going to install GOB ***])
21   SUBDIRS="src examples"
22 else
23   SUBDIRS="src examples doc"
24 fi
25 AC_SUBST(SUBDIRS)
26
27 dnl Checks for programs.
28 AC_ISC_POSIX
29 AC_PROG_CC
30 AC_STDC_HEADERS
31 AC_PROG_YACC
32 AM_PROG_LEX
33 AC_PROG_INSTALL
34 AC_PROG_CPP
35 AC_PATH_PROG(RM, rm, /bin/rm)
36 AC_PATH_PROG(MV, mv, /bin/mv)
37 AC_PATH_PROG(TAR, tar, /bin/tar)
38 PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
39 AC_SUBST(GLIB_CFLAGS)
40 AC_SUBST(GLIB_LIBS)
41 dnl We don't check popt since we're not using it at the moment, but
42 dnl We just might use it later
43 dnl AC_CHECK_LIB(popt,poptGetContext, [POPT_LIB="-lpopt"],
44 dnl          AC_MSG_ERROR(Popt library not found, find it on ftp://ftp.redhat.com/pub/redhat/code/))
45 dnl AC_SUBST(POPT_LIB)
46
47
48 dnl AM_PROG_LIBTOOL
49
50 AC_SUBST(CFLAGS)
51 AC_SUBST(CPPFLAGS)
52 AC_SUBST(LDFLAGS)
53 AC_SUBST(YFLAGS)
54
55 AC_OUTPUT([
56 gob2.spec
57 Makefile
58 src/Makefile
59 doc/Makefile
60 examples/Makefile
61 doc/gob2.1])