]> git.draconx.ca Git - gob-dx.git/blobdiff - configure.in
Release 2.0.13
[gob-dx.git] / configure.in
index 77ca8672fedd680b8b418e2545738bd9b088c85f..c551624d8bdeb58b78cd7bd7c416339be1675fb8 100644 (file)
@@ -1,10 +1,37 @@
 dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.2)
-AC_INIT(src/tree.h)
+AC_INIT(src/treefuncs.h)
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(gob,0.0.2)
+AM_INIT_AUTOMAKE(gob2,2.0.13)
+AM_MAINTAINER_MODE
+
+GLIB_REQUIRED=2.0.0
+
+dnl
+dnl  An utter hack to allow embedding of gob inside other packages.
+dnl  if a file is found in the parent directory named NOINST_GOB, then
+dnl  gob is not installed
+dnl
+
+AM_CONDITIONAL(NOINSTGOB, test -f ../NOINST_GOB)
+
+dnl Is there a way to test NOINSTGOB here ?
+if test -f ../NOINST_GOB ; then
+  AC_MSG_RESULT([*** NOT Going to install GOB ***])
+  SUBDIRS="src examples"
+  INSTGOB=""
+  NOINSTGOB="gob2"
+else
+  SUBDIRS="src examples doc"
+  INSTGOB="gob2"
+  NOINSTGOB=""
+fi
+AC_SUBST(SUBDIRS)
+AC_SUBST(INSTGOB)
+AC_SUBST(NOINSTGOB)
 
 dnl Checks for programs.
+AC_ISC_POSIX
 AC_PROG_CC
 AC_STDC_HEADERS
 AC_PROG_YACC
@@ -14,20 +41,27 @@ AC_PROG_CPP
 AC_PATH_PROG(RM, rm, /bin/rm)
 AC_PATH_PROG(MV, mv, /bin/mv)
 AC_PATH_PROG(TAR, tar, /bin/tar)
-AM_PATH_GLIB(1.2.0,,,)
-AC_CHECK_LIB(popt,poptGetContext, [POPT_LIB="-lreadline"],
-            AC_MSG_ERROR(Popt library not found))
-
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+dnl We don't check popt since we're not using it at the moment, but
+dnl We just might use it later
+dnl AC_CHECK_LIB(popt,poptGetContext, [POPT_LIB="-lpopt"],
+dnl         AC_MSG_ERROR(Popt library not found, find it on ftp://ftp.redhat.com/pub/redhat/code/))
+dnl AC_SUBST(POPT_LIB)
 
-#AM_PROG_LIBTOOL
 
-AM_MAINTAINER_MODE
+dnl AM_PROG_LIBTOOL
 
 AC_SUBST(CFLAGS)
 AC_SUBST(CPPFLAGS)
 AC_SUBST(LDFLAGS)
+AC_SUBST(YFLAGS)
 
 AC_OUTPUT([
+gob2.spec
 Makefile
 src/Makefile
-doc/Makefile])
+doc/Makefile
+examples/Makefile
+doc/gob2.1])