[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: branch: master updated (1.3.0-20071229-9-g2555742)



The branch, master has been updated
       via  25557429d0ca8baaa921b4a2ce5f243f8df8dfc2 (commit)
       via  d81a0717852c1b6da5b99f6cf0dc93f6ddcdc87f (commit)
       via  1a1cbb29f5d1ff118fb91235463e57a48ba81054 (commit)
      from  5f3cde4f20975275cb38b52cd3155fda41201209 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/Makefile.am                        |    6 ++
 gschem/autogen.sh                         |   88 +++++++++++++++++++++++-----
 gschem/configure.ac.in                    |    1 +
 libgeda/.gitignore                        |    1 +
 libgeda/Makefile.am                       |    5 ++
 libgeda/autogen.sh                        |   58 ++++++++++++++-----
 libgeda/{configure.ac => configure.ac.in} |    3 +-
 7 files changed, 129 insertions(+), 33 deletions(-)
 rename libgeda/{configure.ac => configure.ac.in} (99%)


=================
 Commit Messages
=================

commit 25557429d0ca8baaa921b4a2ce5f243f8df8dfc2
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date:   Tue Jan 1 16:14:09 2008 -0500

    Updated gschem's autogen.sh to be identical libgeda's
    
    This commit also fixed up the build mechanism for gschem to recreate
    configure.ac if configure.ac.in changes.  These changes are identical to
    1a1cbb29f5d1ff118fb91235463e57a48ba81054

:100644 100644 0f1ee6f... 8a67a0d... M	gschem/Makefile.am
:100755 100755 25175e0... bd66f9b... M	gschem/autogen.sh
:100644 100644 43de51d... 26816ad... M	gschem/configure.ac.in

commit d81a0717852c1b6da5b99f6cf0dc93f6ddcdc87f
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date:   Tue Jan 1 14:37:12 2008 -0500

    Added configure.ac into libgeda's .gitignore file

:100644 100644 0cbc877... 2398957... M	libgeda/.gitignore

commit 1a1cbb29f5d1ff118fb91235463e57a48ba81054
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date:   Tue Jan 1 14:29:27 2008 -0500

    Changed libgeda's configure mechanism to be similar to gschem's configure.ac.in
    
    In order to allow a wide range of gettext versions to be used, gschem has
    a configure hack that dynamically figures out the gettext version and creates
    configure.ac from configure.ac.in.  This hack is now in libgeda with the
    additional improvement that if configure.ac.in changes, configure.ac and
    configure are automatically recreated.  Added a special mode to autogen.sh
    (recreate_configure_only) to support this improvement.

:100644 100644 c4d9721... 6cd5946... M	libgeda/Makefile.am
:100755 100755 3989a4f... bd66f9b... M	libgeda/autogen.sh
:100644 000000 7f186d4... 0000000... D	libgeda/configure.ac
:000000 100644 0000000... 4add99d... A	libgeda/configure.ac.in

=========
 Changes
=========

commit 25557429d0ca8baaa921b4a2ce5f243f8df8dfc2
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date:   Tue Jan 1 16:14:09 2008 -0500

    Updated gschem's autogen.sh to be identical libgeda's
    
    This commit also fixed up the build mechanism for gschem to recreate
    configure.ac if configure.ac.in changes.  These changes are identical to
    1a1cbb29f5d1ff118fb91235463e57a48ba81054

diff --git a/gschem/Makefile.am b/gschem/Makefile.am
index 0f1ee6f..8a67a0d 100644
--- a/gschem/Makefile.am
+++ b/gschem/Makefile.am
@@ -21,6 +21,12 @@ maintainer-clean-local:
           po/*.sed po/*.header po/*.sin po/*.template po/Rules-quot \
           m4/*.m4 
 
+
+# Special rule to make sure that configure.ac is recreated when configure.ac.in
+# changes.
+configure.ac: configure.ac.in
+	./autogen.sh recreate_configure_only
+
 ACLOCAL_AMFLAGS = -I m4
 
 MOSTLYCLEANFILES = *.log core FILE *~
diff --git a/gschem/autogen.sh b/gschem/autogen.sh
index 25175e0..bd66f9b 100755
--- a/gschem/autogen.sh
+++ b/gschem/autogen.sh
@@ -8,6 +8,20 @@ srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
 configure_script=configure.ac.in
 
+# If "recreate_configure_only" is specified on the command line as the first
+# argument, then enter a special mode to rebuild configure only.  If we add
+# arguments to this script, then this has to be made a bit more intelligent.
+if test "$1" = "recreate_configure_only"; then
+  recreate_configure_only=1
+else
+  recreate_configure_only=0
+fi
+
+# Automake required version
+AM_1=1  # Major number
+AM_2=6
+AM_3=0  # Minor number
+
 # Possible names for libtool/libtoolize
 libtoolize_candidates="libtoolize glibtoolize"
 
@@ -55,6 +69,39 @@ DIE=0
   NO_AUTOMAKE=yes
 }
 
+# check automake version. Test came from gpsd version 2.34. cnieves 2007-02-10
+if [ -z "$NO_AUTOMAKE" ]; then
+  AM_VERSION=`automake --version | sed -n -e 's#[^0-9]* \([0-9]*\)\.\([0-9]*\)\.*\([0-9]*\).*$#\1 \2 \3#p'`
+  AM_V1=`echo $AM_VERSION | awk '{print $1}'`
+  AM_V2=`echo $AM_VERSION | awk '{print $2}'`
+  AM_V3=`echo $AM_VERSION | awk '{print $3}'`
+
+  if [ "$AM_1" -gt "$AM_V1" ]; then
+    AM_ERROR=1 
+  else
+    if [ "$AM_1" -eq "$AM_V1" ]; then
+      if [ "$AM_2" -gt "$AM_V2" ]; then
+        AM_ERROR=1 
+      else
+        if [ "$AM_2" -eq "$AM_V2" ]; then
+          if [ -n "$AM_V3" -a "$AM_3" -gt "$AM_V3" ]; then
+            AM_ERROR=1 
+          fi
+        fi
+      fi
+    fi
+  fi
+
+  if [ -n "$AM_ERROR" ]; then
+    echo
+    echo "**Error**: Found automake version $AM_V1.$AM_V2.$AM_V3"
+    echo "You must have \`automake' version $AM_1.$AM_2.$AM_3 or greater installed."
+    echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/";
+    DIE=1
+  fi 
+fi
+
+
 
 # if no automake, don't bother testing for aclocal
 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
@@ -82,9 +129,10 @@ xlc )
   am_opt=--include-deps;;
 esac
 
-# Create the configure.ac from the configure.ac.in file.  
+# Create the configure.ac from the configure.ac.in file.
 # The below line to get the gettext version isn't the most robust construct
 # because if gettext changes its version output format, this will break.
+echo autogen.sh creating configure.ac
 installed_gettext_version=`gettext --version | grep gettext | awk '{print $4}'`
 cat $configure_script | \
   sed "s/%INSTALLED_GETTEXT_VERSION%/$installed_gettext_version/" > configure.ac
@@ -101,28 +149,36 @@ do
 
       aclocalinclude="$ACLOCAL_FLAGS"
 
-      if grep "^AM_GNU_GETTEXT" $configure_script >/dev/null; then
-	echo "autogen.sh running: autopoint ..." 
-	echo "no" | autopoint --force 
-	#echo "Creating $dr/po/Makevars ..."
-        #mv -f $dr/po/Makevars.template $dr/po/Makevars
-      fi
-      if grep "^IT_PROG_INTLTOOL" $configure_script >/dev/null; then
-	echo "autogen.sh running: intltoolize ..."
-	echo "no" | intltoolize --force --copy --automake
-      fi
-      if grep "^AM_PROG_LIBTOOL" $configure_script >/dev/null; then
-	echo "autogen.sh running: libtoolize ..."
-	$LIBTOOLIZE --force --copy
+      if test "$recreate_configure_only" = "0"; then
+        # Only run these if we are NOT in the recreate_configure_only mode
+        if grep "^AM_GNU_GETTEXT" $configure_script >/dev/null; then
+	  echo "autogen.sh running: autopoint ..." 
+	  echo "no" | autopoint --force 
+	fi
+	if grep "^IT_PROG_INTLTOOL" $configure_script >/dev/null; then
+	    echo "autogen.sh running: intltoolize ..."
+	    echo "no" | intltoolize --force --copy --automake
+	fi
+	if grep "^AM_PROG_LIBTOOL" $configure_script >/dev/null; then
+	    echo "autogen.sh running: libtoolize ..."
+	    $LIBTOOLIZE --force --copy
+	fi
       fi
+
+
       echo "autogen.sh running: aclocal $aclocalinclude ..."
       aclocal $aclocalinclude
       if grep "^AM_CONFIG_HEADER" $configure_script >/dev/null; then
 	echo "autogen.sh running: autoheader ..."
 	autoheader
       fi
-      echo "autogen.sh running: automake $am_opt ..."
-      automake --copy --add-missing --gnu $am_opt
+
+      if test "$recreate_configure_only" = "0"; then
+        # Only run these if we are NOT in the recreate_configure_only mode
+        echo "autogen.sh running: automake $am_opt ..."
+	automake --copy --add-missing --gnu $am_opt
+      fi
+
       echo "autogen.sh running: autoconf ..."
       autoconf 
     )
diff --git a/gschem/configure.ac.in b/gschem/configure.ac.in
index 43de51d..26816ad 100644
--- a/gschem/configure.ac.in
+++ b/gschem/configure.ac.in
@@ -11,6 +11,7 @@ echo Configuring $PACKAGE version $DOTTED_VERSION.$DATE_VERSION
 # Initialize automake 
 AM_INIT_AUTOMAKE($PACKAGE, $DOTTED_VERSION, no-define)
 AM_CONFIG_HEADER([config.h])
+AC_SUBST([CONFIG_DEPENDENCIES], ['$(top_srcdir)/configure.ac.in'])
 
 # Call this to make autoconf and friends happy
 AC_GNU_SOURCE

commit d81a0717852c1b6da5b99f6cf0dc93f6ddcdc87f
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date:   Tue Jan 1 14:37:12 2008 -0500

    Added configure.ac into libgeda's .gitignore file

diff --git a/libgeda/.gitignore b/libgeda/.gitignore
index 0cbc877..2398957 100644
--- a/libgeda/.gitignore
+++ b/libgeda/.gitignore
@@ -8,6 +8,7 @@ config.h
 config.h.in
 config.log
 config.status
+configure.ac
 libgeda.pc
 aclocal.m4
 config.guess

commit 1a1cbb29f5d1ff118fb91235463e57a48ba81054
Author: Ales Hvezda <ahvezda@xxxxxxxx>
Date:   Tue Jan 1 14:29:27 2008 -0500

    Changed libgeda's configure mechanism to be similar to gschem's configure.ac.in
    
    In order to allow a wide range of gettext versions to be used, gschem has
    a configure hack that dynamically figures out the gettext version and creates
    configure.ac from configure.ac.in.  This hack is now in libgeda with the
    additional improvement that if configure.ac.in changes, configure.ac and
    configure are automatically recreated.  Added a special mode to autogen.sh
    (recreate_configure_only) to support this improvement.

diff --git a/libgeda/Makefile.am b/libgeda/Makefile.am
index c4d9721..6cd5946 100644
--- a/libgeda/Makefile.am
+++ b/libgeda/Makefile.am
@@ -21,6 +21,11 @@ distclean-local:
 maintainer-clean-local:
 	-rm -rf autom4te.cache
 
+# Special rule to make sure that configure.ac is recreated when configure.ac.in
+# changes.
+configure.ac: configure.ac.in
+	./autogen.sh recreate_configure_only
+
 MOSTLYCLEANFILES = *.log core FILE *~
 CLEANFILES = *.log core FILE *~
 DISTCLEANFILES = *.log core FILE *~ prototype.bak libgeda.pc \
diff --git a/libgeda/autogen.sh b/libgeda/autogen.sh
index 3989a4f..bd66f9b 100755
--- a/libgeda/autogen.sh
+++ b/libgeda/autogen.sh
@@ -6,7 +6,16 @@
 
 srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
-configure_script=configure.ac
+configure_script=configure.ac.in
+
+# If "recreate_configure_only" is specified on the command line as the first
+# argument, then enter a special mode to rebuild configure only.  If we add
+# arguments to this script, then this has to be made a bit more intelligent.
+if test "$1" = "recreate_configure_only"; then
+  recreate_configure_only=1
+else
+  recreate_configure_only=0
+fi
 
 # Automake required version
 AM_1=1  # Major number
@@ -120,6 +129,15 @@ xlc )
   am_opt=--include-deps;;
 esac
 
+# Create the configure.ac from the configure.ac.in file.
+# The below line to get the gettext version isn't the most robust construct
+# because if gettext changes its version output format, this will break.
+echo autogen.sh creating configure.ac
+installed_gettext_version=`gettext --version | grep gettext | awk '{print $4}'`
+cat $configure_script | \
+  sed "s/%INSTALLED_GETTEXT_VERSION%/$installed_gettext_version/" > configure.ac
+configure_script=configure.ac
+
 for coin in $srcdir/$configure_script
 do 
   dr=`dirname $coin`
@@ -131,28 +149,36 @@ do
 
       aclocalinclude="$ACLOCAL_FLAGS"
 
-      if grep "^AM_GNU_GETTEXT" $configure_script >/dev/null; then
-	echo "autogen.sh running: autopoint ..." 
-	echo "no" | autopoint --force 
-	#echo "Creating $dr/po/Makevars ..."
-        #mv -f $dr/po/Makevars.template $dr/po/Makevars
-      fi
-      if grep "^IT_PROG_INTLTOOL" $configure_script >/dev/null; then
-	echo "autogen.sh running: intltoolize ..."
-	echo "no" | intltoolize --force --copy --automake
-      fi
-      if grep "^AM_PROG_LIBTOOL" $configure_script >/dev/null; then
-	echo "autogen.sh running: libtoolize ..."
-	$LIBTOOLIZE --force --copy
+      if test "$recreate_configure_only" = "0"; then
+        # Only run these if we are NOT in the recreate_configure_only mode
+        if grep "^AM_GNU_GETTEXT" $configure_script >/dev/null; then
+	  echo "autogen.sh running: autopoint ..." 
+	  echo "no" | autopoint --force 
+	fi
+	if grep "^IT_PROG_INTLTOOL" $configure_script >/dev/null; then
+	    echo "autogen.sh running: intltoolize ..."
+	    echo "no" | intltoolize --force --copy --automake
+	fi
+	if grep "^AM_PROG_LIBTOOL" $configure_script >/dev/null; then
+	    echo "autogen.sh running: libtoolize ..."
+	    $LIBTOOLIZE --force --copy
+	fi
       fi
+
+
       echo "autogen.sh running: aclocal $aclocalinclude ..."
       aclocal $aclocalinclude
       if grep "^AM_CONFIG_HEADER" $configure_script >/dev/null; then
 	echo "autogen.sh running: autoheader ..."
 	autoheader
       fi
-      echo "autogen.sh running: automake $am_opt ..."
-      automake --copy --add-missing --gnu $am_opt
+
+      if test "$recreate_configure_only" = "0"; then
+        # Only run these if we are NOT in the recreate_configure_only mode
+        echo "autogen.sh running: automake $am_opt ..."
+	automake --copy --add-missing --gnu $am_opt
+      fi
+
       echo "autogen.sh running: autoconf ..."
       autoconf 
     )
diff --git a/libgeda/configure.ac b/libgeda/configure.ac
deleted file mode 100644
index 7f186d4..0000000
--- a/libgeda/configure.ac
+++ /dev/null
@@ -1,543 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-AC_INIT
-AC_CONFIG_SRCDIR([include/libgeda.h])
-AC_PREREQ(2.54)
-
-PACKAGE=libgeda
-DOTTED_VERSION=1.3.0
-DATE_VERSION=20071229
-SHARED_LIBRARY_VERSION=32:0:0
-echo Configuring $PACKAGE version $DOTTED_VERSION.$DATE_VERSION
-
-# Init automake
-AM_INIT_AUTOMAKE($PACKAGE, $DOTTED_VERSION, no-define)
-AM_CONFIG_HEADER([config.h])
-
-# Call this to make autoconf and friends happy
-AC_GNU_SOURCE
-
-# Init libtool
-AM_PROG_LIBTOOL
-
-#########################################################################
-# Command line flags start
-# 
-
-# Change default location for rc files
-AC_ARG_WITH(rcdir, [  --with-rcdir=path       Change where the system-*rc files are installed], [opt_rcdir=$withval])
-
-# Change default location for XDG files (MIME and Icons)
-AC_ARG_WITH(xdgdir, [  --with-xdgdir=path      Change where the theme icons and mime registrations are installed [[DATAROOTDIR]]], [opt_xdgdir=$withval])
-
-# Change default location for KDE files (KDE MIME registrations)
-AC_ARG_WITH(kdedir, [  --with-kdedir=path      Change where the KDE mime registrations are installed [[PREFIX]]], [opt_kdedir=$withval])
-
-# 
-# Command line flags end
-#########################################################################
-
-# Checks for libraries.
-#########################################################################
-# 
-# Misc win32 / mingw checks and variables start
-
-# Figure out if we are building on win32 and what environment.
-case $host_os in
-  *mingw32* ) echo "Configuring for mingw"; MINGW=yes ;;
-esac
-
-if ! test "$MINGW" = "no" -o "$MINGW"x = x; then
-   MINGW_CFLAGS="-mms-bitfields -mwindows"
-   MINGW="yes"
-else
-   # Unix host
-   MINGW_CFLAGS=
-   MINGW="no"
-fi
-
-# 
-# Misc win32 / mingw checks and variables end
-#########################################################################
-
-# Checks for programs.
-AC_PROG_CC
-AM_CONDITIONAL(CCISGCC, test "$GCC" = "yes")
-AC_PROG_CPP
-AC_PROG_MAKE_SET
-
-############################################################################
-# Internationalisation start
-#
-# Set USE_NLS
-AM_NLS
-
-# Set package name for translations
-so_major=`echo "$SHARED_LIBRARY_VERSION" | sed 's/:.*//'`
-GETTEXT_PACKAGE=$PACKAGE$so_major
-AH_TEMPLATE([GETTEXT_PACKAGE], [Name of this program's gettext domain])
-AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"])
-AC_SUBST(GETTEXT_PACKAGE)
-
-# Initialise gettext
-AM_GNU_GETTEXT
-AM_GNU_GETTEXT_VERSION([0.16.1])
-
-# Initialise intltool
-IT_PROG_INTLTOOL(0.35.0)
-
-# 
-# Internationalisation end
-#########################################################################
-
-############################################################################
-# Check for guile start
-#
-GUILE_FLAGS
-
-# Check Guile version
-guile_need_major=1
-guile_need_minor=6
-guile_need_version="$guile_need_major[].$guile_need_minor.0"
-
-AC_MSG_CHECKING([Guile version >= $guile_need_version])
-GUILE_VERSION=`$GUILE_CONFIG info guileversion`
-
-guile_major=`echo "$GUILE_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'`
-guile_minor=`echo "$GUILE_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
-AC_MSG_RESULT($GUILE_VERSION)
-
-if test "$guile_need_major" -gt "$guile_major" \
-   || (test "$guile_need_major" -eq "$guile_major" \
-       && test "$guile_need_minor" -gt "$guile_minor"); then
-  AC_MSG_ERROR([Guile version >= $guile_need_version is required.])
-fi
-
-# Guile 1.6 compatability
-
-CFLAGS_temp_save="$CFLAGS"
-CFLAGS="$CFLAGS $GUILE_CFLAGS"
-AC_CHECK_DECLS([
-scm_c_catch,
-scm_caddr,
-scm_cadr,
-scm_car,
-scm_from_int,
-scm_from_locale_string,
-scm_from_locale_symbol,
-scm_is_false,
-scm_is_integer,
-scm_is_string,
-scm_is_true,
-scm_to_int,
-scm_to_locale_string],,,
-[#include <libguile.h>])
-CFLAGS="$CFLAGS_temp_save"
-
-#
-# Check for guile end
-############################################################################
-
-############################################################################
-# Check for mics things start
-# 
-# Checking for rint in math library
-AC_CHECK_LIB(m, rint, AC_DEFINE(HAS_RINT, 1, [If your math library has rint in it, define this]), no_RINT="yes")
-
-# Checking for dynamic lib
-AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", DL_LIB="")
-#
-# Check for mics things start
-############################################################################
-
-############################################################################
-# Check for X11 start
-# 
-
-if test "$MINGW" = "no"
-then
-   AC_PATH_X
-   AC_PATH_XTRA 
-    
-   X_EXTRA_LIBS="$X_EXTRA_LIBS"
-   X_LDFLAGS="$X_LDFLAGS $X_LIBS $X_EXTRA_LIBS $X_PRE_LIBS -lX11 -lm"
-fi
-
-# 
-# Check for X11 end
-############################################################################
-
-############################################################################
-# Check for gtk+ 2.4 start
-# 
-
-# Check for pkg-config
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test $PKG_CONFIG = no; then
-   AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
-fi
-
-PKG_CHECK_MODULES(GTK24, gtk+-2.0 >= 2.4.0, GTK24="yes", no_GTK24="yes")
-
-# This next bit of code figures out what gtk we need to use.
-if test "$GTK24" = "yes"
-then
-
-   AC_DEFINE(HAS_GTK24, 1, [If gtk+ 2.4.x has been installed, define this])
-   GTK_CFLAGS=$GTK24_CFLAGS
-   GTK_LIBS=$GTK24_LIBS
-   GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion`
-
-   # Search for glib
-   PKG_CHECK_MODULES(GLIB24, glib-2.0 >= 2.4.0, GLIB24="yes", no_GLIB24="yes")
-   if test "$GLIB24" != "yes"
-   then
-       AC_MSG_ERROR([Cannot find glib 2.4.x, install it and rerun ./configure.
-You may find the following error output (if any) useful:
-$GLIB24_PKG_ERRORS
-])
-   fi
-   GLIB_CFLAGS=$GLIB24_CFLAGS
-   GLIB_LIBS=$GLIB24_LIBS
-   GLIB_VERSION=`$PKG_CONFIG glib-2.0 --modversion`
-
-else
-   GTK_VERSION=""
-fi
-
-if test "$GTK_VERSION" = ""
-then
-   AC_MSG_ERROR([Cannot find gtk+ 2.4.x or later, please install gtk+.])
-fi
-
-# 
-# Check for gtk+ 2.4 end
-############################################################################
-
-############################################################################
-# Check for gdk 2.4 or later
-# 
-
-# Check for pkg-config
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test $PKG_CONFIG = no; then
-   AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
-fi
-
-PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.4.0, GDK="yes", no_GDK="yes")
-
-# This next bit of code figures out what gtk we need to use.
-if test "$GDK" = "yes" 
-then
-
-   AC_DEFINE(HAS_GDK, 1, [If gdk has been installed, define this])
-   GDK_CFLAGS=$GDK_CFLAGS
-   GDK_LIBS=$GDK_LIBS
-   GDK_VERSION=`$PKG_CONFIG gdk-2.0 --modversion`
-
-fi
-
-if test "$GDK_VERSION" = ""
-then
-   AC_MSG_ERROR([Cannot find gdk, please make sure it is installed.])
-fi
-
-# 
-# Check for gdk end
-############################################################################
-
-############################################################################
-# Check for gdk-pixbuf 
-# 
-
-# Check for pkg-config
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test $PKG_CONFIG = no; then
-   AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
-fi
-
-PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 0.15.0, GDK_PIXBUF="yes", no_GDK_PIXBUF="yes")
-
-# This next bit of code figures out what gtk we need to use.
-if test "$GDK_PIXBUF" = "yes" 
-then
-
-   AC_DEFINE(HAS_GDK_PIXBUF, 1, [If gdk-pixbuf has been installed, define this])
-   GDK_PIXBUF_CFLAGS=$GDK_PIXBUF_CFLAGS
-   GDK_PIXBUF_LIBS=$GDK_PIXBUF_LIBS
-   GDK_PIXBUF_VERSION=`$PKG_CONFIG gdk-pixbuf-2.0 --modversion`
-
-fi
-
-if test "$GDK_PIXBUF_VERSION" = ""
-then
-   AC_MSG_ERROR([Cannot find gdk-pixbuf, please make sure it is installed.])
-fi
-
-# 
-# Check for gdk-pixbuf end
-############################################################################
-
-
-
-############################################################################
-# Check for doxygen start
-# 
-
-# Doxygen is a utility for generating html and latex documentation
-# from c source code files.
-
-# search for Doxygen 
-AC_PATH_PROG(DOXYGEN, doxygen, no, ${PATH})
-
-if test "$DOXYGEN" = "no"; then 
-   # doxygen is not available on the system
-   echo "** Cannot find Doxygen! **"
-   echo "**   Documentation creation disabled    **"
-   DOXYGEN=echo
-
-   # prevent from creating html and latex documents.
-   # but does not prevent from processing gschemdoc
-   builddoc=false
-else 
-   # doxygen is available on the system.
-   # now checking if the tools for Texinfo files processing
-   # is installed.
-   # The docs can be either processed to produce dvi, html or info
-   # with texi2dvi, texi2html or makeinfo respectively
-   # Note : these tests on makeinfo and texi2dvi are no more 
-   #        needed as automake makes them for us
-
-   # enable the creation of html and latex documents.
-   builddoc=true
-fi
-
-# depending on variable builddoc, weaving is performed or not
-# using conditionnal in docs/Makefile.in
-AM_CONDITIONAL(BUILDDOC, test x$builddoc = xtrue)
-
-# 
-# Check for doxygen end
-#########################################################################
-
-#########################################################################
-# Checks for header files start
-# 
-
-AC_HEADER_STDC
-AC_HEADER_SYS_WAIT
-AC_HEADER_DIRENT
-AC_CHECK_HEADERS(unistd.h string.h stdlib.h stdarg.h assert.h fcntl.h \
-                 errno.h)
-
-AC_MSG_CHECKING([for optarg in unistd.h])
-AC_TRY_COMPILE(
-[#include <unistd.h>],
-[ char *string = optarg; int i = optind; ],
-optarg_found=yes,
-optarg_found=no)
-AC_MSG_RESULT($optarg_found)
-if test $optarg_found = yes; then
-   AC_DEFINE(OPTARG_IN_UNISTD, 1, [Define if you have optarg in unistd.h])
-fi
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-
-# Checks for library functions.
-AC_TYPE_SIGNAL
-AC_CHECK_FUNCS(getcwd strstr vsnprintf snprintf chown)
-
-# 
-# Checks for header files end
-#########################################################################
-
-#########################################################################
-#
-
-# ------------- dmalloc -------------------
-dnl dmalloc checks
-with_dmalloc="no"
-AC_MSG_CHECKING([if dmalloc debugging should be enabled])
-AC_ARG_ENABLE([dmalloc],
-[  --enable-dmalloc        Compile and link with dmalloc for malloc debugging [[default=no]]],
-[
-if test "X$enable_dmalloc" != "Xno" ; then
-        AC_MSG_RESULT([yes])
-        AC_CHECK_HEADER(dmalloc.h,,
-                AC_ERROR([You have requested dmalloc debugging but dmalloc.h could not be found]))
-        AC_CHECK_LIB(dmalloc,main,,
-                AC_ERROR([You have requested dmalloc debugging but -ldmalloc could not be found]))
-        DMALLOC_LIBS="-ldmalloc"
-        with_dmalloc="yes"
-else
-        AC_MSG_RESULT([no])
-        DMALLOC_LIBS=""
-fi
-],
-[
-        AC_MSG_RESULT([no])
-        DMALLOC_LIBS=""
-])
-
-# ------------- ElectricFence -------------------
-dnl ElectricFence checks
-with_efence="no"
-AC_MSG_CHECKING([if ElectricFence debugging should be enabled])
-AC_ARG_ENABLE([efence],
-[  --enable-efence         Link with ElectricFence for malloc debugging [[default=no]]],
-[
-if test "X$enable_efence" != "Xno" ; then
-        AC_MSG_RESULT([yes])
-        AC_CHECK_LIB(efence,main,,
-                AC_ERROR([You have requested ElectricFence debugging but -lefence could not be found]))
-        with_efence="yes"
-else
-        AC_MSG_RESULT([no])
-fi
-],
-[
-AC_MSG_RESULT([no])
-])
-
-#
-#########################################################################
-
-#########################################################################
-# gEDA/gaf specific setup start
-#
-
-DATADIR=gEDA
-GEDADATADIR=$datadir/$DATADIR
-
-if eval "test x$opt_rcdir = x"; then
-	# path was not specified with --with-rcdir
-        AC_DEFINE_UNQUOTED(GEDARCDIR, "none", [gEDA/gaf's rc directory])
-	GEDARCDIR=$GEDADATADIR
-else
-	# path WAS specified with --with-rcdir
-        AC_DEFINE_UNQUOTED(GEDARCDIR, "$opt_rcdir", [gEDA/gaf's rc directory])
-	GEDARCDIR="$opt_rcdir"
-fi
-
-if test x$opt_xdgdir = x; then
-        # path was not specified with --with-xdgdir
-        XDGDIR='${datarootdir}'
-else
-        # path WAS specified with --with-xdgdir
-        #AC_DEFINE_UNQUOTED(XDGDIR, "$opt_xdgdir", [gEDA/gaf's rc directory])
-        XDGDIR="$opt_xdgdir"
-fi
-AC_SUBST(XDGDIR)
-
-if test x$opt_kdedir = x; then
-        # path was not specified with --with-kdedir
-        KDEDIR='${prefix}'
-else
-        # path WAS specified with --with-kdedir
-        KDEDIR="$opt_kdedir"
-fi
-AC_SUBST(KDEDIR)
-
-# Defs for libary symbol files
-#
-# Expand the prefix variable
-if eval "test x$prefix = xNONE"; then
- dprefix=$ac_default_prefix
-else
- dprefix=$prefix
-fi
-
-gedatopdir=$dprefix/share/$DATADIR
-expandgedadatadir=`echo $gedatopdir`
-
-# this has to be expanded ( no ${prefix} ) --
-AC_DEFINE_UNQUOTED(GEDADATADIR, "$gedatopdir", [gEDA/gaf's data directory])
-AC_DEFINE_UNQUOTED(DATE_VERSION, "$DATE_VERSION", [Currently running date version of gEDA/gaf])
-AC_DEFINE_UNQUOTED(DOTTED_VERSION, "$DOTTED_VERSION", [Currently running dotted version of gEDA/gaf])
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this program's package])
-
-#
-# gEDA/gaf specify things which need to setup
-#########################################################################
-
-#########################################################################
-# Update mime database utility start
-#
-# Adapted from gnome-control-center.
-#
-
-AC_ARG_ENABLE(update-mime-database,
-   AC_HELP_STRING([--disable-update-mime-database],
-                   [do not update mime database after installation]),,
-                   enable_update_mime_database=yes)
-
-AM_CONDITIONAL(ENABLE_UPDATE_MIME_DATABASE,
-               test x$enable_update_mime_database = xyes)
-
-if test x$enable_update_mime_database = xyes ; then
-  AC_PATH_PROG(UPDATE_MIME_DATABASE, [update-mime-database], no)
-  if test $UPDATE_MIME_DATABASE = no; then
-     AC_MSG_ERROR([Cannot find update-mime-database, make sure it is installed and in your PATH, or configure with --disable-update-mime-database])
-  fi
-fi
-
-#
-# Update mime database utility end
-#########################################################################
-
-# Finally create the final CFLAGS and LDFLAGS for use in the makefiles
-LIBGEDA_CFLAGS="$MINGW_CFLAGS $GUILE_CFLAGS $GTK_CFLAGS $X_CFLAGS $GDK_PIXBUF_CFLAGS $GDK_CFLAGS"
-LIBGEDA_LDFLAGS="$GUILE_LDFLAGS $GLIB_LIBS $DMALLOC_LIBS $GDK_PIXBUF_LIBS $GDK_LIBS"
-LIBTOOL_FLAGS="-version-info $SHARED_LIBRARY_VERSION"
-
-# Makefile.in variable substitution
-AC_SUBST(DATE_VERSION)
-AC_SUBST(DOTTED_VERSION)
-AC_SUBST(LIBGEDA_CFLAGS)
-AC_SUBST(LIBGEDA_LDFLAGS)
-AC_SUBST(LIBTOOL_FLAGS)
-AC_SUBST(GEDADATADIR)
-AC_SUBST(GEDARCDIR)
-AC_SUBST(PATHSEP)
-AC_SUBST(OTHERPATHSEP)
-AC_SUBST(GUILEINTERP)
-AC_SUBST(INDENT)
-
-# Create all the necessary derived files
-AC_CONFIG_FILES([Makefile
-                 src/Makefile
-                 scripts/Makefile
-                 include/Makefile
-                 docs/Makefile
-                 data/Makefile
-                 intl/Makefile
-                 po/Makefile.in
-                 po/Makefile
-	         libgeda.pc
-		 share/Makefile
-		 lib/Makefile
-		 scheme/Makefile ])
-
-AC_OUTPUT
-
-expandedGEDADATADIR=`eval "echo $GEDADATADIR"`
-expandedGEDARCDIR=`eval "echo $GEDARCDIR"`
-expandedXDGDIR=`eval "echo $XDGDIR"`
-
-AC_MSG_RESULT([
-** Configuration summary for $PACKAGE $DOTTED_VERSION.$DATE_VERSION
-
-   GLIB library version:             $GLIB_VERSION
-   GTK+ library version:             $GTK_VERSION
-   GUILE library version:            $GUILE_VERSION
-   GDK-PIXBUF (png output):          $GDK_PIXBUF_VERSION
-   mingw build:                      $MINGW
-   data directory:                   $expandedGEDADATADIR
-   rc directory:                     $expandedGEDARCDIR
-   xdg directory:                    $expandedXDGDIR
-   KDE directory:                    $KDEDIR
-   LIBGEDA .so version:              $SHARED_LIBRARY_VERSION
-   dmalloc debugging:                $with_dmalloc
-   ElectricFence debugging:          $with_efence
-])
-
diff --git a/libgeda/configure.ac.in b/libgeda/configure.ac.in
new file mode 100644
index 0000000..4add99d
--- /dev/null
+++ b/libgeda/configure.ac.in
@@ -0,0 +1,544 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT
+AC_CONFIG_SRCDIR([include/libgeda.h])
+AC_PREREQ(2.54)
+
+PACKAGE=libgeda
+DOTTED_VERSION=1.3.0
+DATE_VERSION=20071229
+SHARED_LIBRARY_VERSION=32:0:0
+echo Configuring $PACKAGE version $DOTTED_VERSION.$DATE_VERSION
+
+# Init automake
+AM_INIT_AUTOMAKE($PACKAGE, $DOTTED_VERSION, no-define)
+AM_CONFIG_HEADER([config.h])
+AC_SUBST([CONFIG_DEPENDENCIES], ['$(top_srcdir)/configure.ac.in'])
+
+# Call this to make autoconf and friends happy
+AC_GNU_SOURCE
+
+# Init libtool
+AM_PROG_LIBTOOL
+
+#########################################################################
+# Command line flags start
+# 
+
+# Change default location for rc files
+AC_ARG_WITH(rcdir, [  --with-rcdir=path       Change where the system-*rc files are installed], [opt_rcdir=$withval])
+
+# Change default location for XDG files (MIME and Icons)
+AC_ARG_WITH(xdgdir, [  --with-xdgdir=path      Change where the theme icons and mime registrations are installed [[DATAROOTDIR]]], [opt_xdgdir=$withval])
+
+# Change default location for KDE files (KDE MIME registrations)
+AC_ARG_WITH(kdedir, [  --with-kdedir=path      Change where the KDE mime registrations are installed [[PREFIX]]], [opt_kdedir=$withval])
+
+# 
+# Command line flags end
+#########################################################################
+
+# Checks for libraries.
+#########################################################################
+# 
+# Misc win32 / mingw checks and variables start
+
+# Figure out if we are building on win32 and what environment.
+case $host_os in
+  *mingw32* ) echo "Configuring for mingw"; MINGW=yes ;;
+esac
+
+if ! test "$MINGW" = "no" -o "$MINGW"x = x; then
+   MINGW_CFLAGS="-mms-bitfields -mwindows"
+   MINGW="yes"
+else
+   # Unix host
+   MINGW_CFLAGS=
+   MINGW="no"
+fi
+
+# 
+# Misc win32 / mingw checks and variables end
+#########################################################################
+
+# Checks for programs.
+AC_PROG_CC
+AM_CONDITIONAL(CCISGCC, test "$GCC" = "yes")
+AC_PROG_CPP
+AC_PROG_MAKE_SET
+
+############################################################################
+# Internationalisation start
+#
+# Set USE_NLS
+AM_NLS
+
+# Set package name for translations
+so_major=`echo "$SHARED_LIBRARY_VERSION" | sed 's/:.*//'`
+GETTEXT_PACKAGE=$PACKAGE$so_major
+AH_TEMPLATE([GETTEXT_PACKAGE], [Name of this program's gettext domain])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"])
+AC_SUBST(GETTEXT_PACKAGE)
+
+# Initialise gettext
+AM_GNU_GETTEXT
+AM_GNU_GETTEXT_VERSION([%INSTALLED_GETTEXT_VERSION%])
+
+# Initialise intltool
+IT_PROG_INTLTOOL(0.35.0)
+
+# 
+# Internationalisation end
+#########################################################################
+
+############################################################################
+# Check for guile start
+#
+GUILE_FLAGS
+
+# Check Guile version
+guile_need_major=1
+guile_need_minor=6
+guile_need_version="$guile_need_major[].$guile_need_minor.0"
+
+AC_MSG_CHECKING([Guile version >= $guile_need_version])
+GUILE_VERSION=`$GUILE_CONFIG info guileversion`
+
+guile_major=`echo "$GUILE_VERSION" | sed 's/\([[^.]][[^.]]*\).*/\1/'`
+guile_minor=`echo "$GUILE_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'`
+AC_MSG_RESULT($GUILE_VERSION)
+
+if test "$guile_need_major" -gt "$guile_major" \
+   || (test "$guile_need_major" -eq "$guile_major" \
+       && test "$guile_need_minor" -gt "$guile_minor"); then
+  AC_MSG_ERROR([Guile version >= $guile_need_version is required.])
+fi
+
+# Guile 1.6 compatability
+
+CFLAGS_temp_save="$CFLAGS"
+CFLAGS="$CFLAGS $GUILE_CFLAGS"
+AC_CHECK_DECLS([
+scm_c_catch,
+scm_caddr,
+scm_cadr,
+scm_car,
+scm_from_int,
+scm_from_locale_string,
+scm_from_locale_symbol,
+scm_is_false,
+scm_is_integer,
+scm_is_string,
+scm_is_true,
+scm_to_int,
+scm_to_locale_string],,,
+[#include <libguile.h>])
+CFLAGS="$CFLAGS_temp_save"
+
+#
+# Check for guile end
+############################################################################
+
+############################################################################
+# Check for mics things start
+# 
+# Checking for rint in math library
+AC_CHECK_LIB(m, rint, AC_DEFINE(HAS_RINT, 1, [If your math library has rint in it, define this]), no_RINT="yes")
+
+# Checking for dynamic lib
+AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", DL_LIB="")
+#
+# Check for mics things start
+############################################################################
+
+############################################################################
+# Check for X11 start
+# 
+
+if test "$MINGW" = "no"
+then
+   AC_PATH_X
+   AC_PATH_XTRA 
+    
+   X_EXTRA_LIBS="$X_EXTRA_LIBS"
+   X_LDFLAGS="$X_LDFLAGS $X_LIBS $X_EXTRA_LIBS $X_PRE_LIBS -lX11 -lm"
+fi
+
+# 
+# Check for X11 end
+############################################################################
+
+############################################################################
+# Check for gtk+ 2.4 start
+# 
+
+# Check for pkg-config
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test $PKG_CONFIG = no; then
+   AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
+fi
+
+PKG_CHECK_MODULES(GTK24, gtk+-2.0 >= 2.4.0, GTK24="yes", no_GTK24="yes")
+
+# This next bit of code figures out what gtk we need to use.
+if test "$GTK24" = "yes"
+then
+
+   AC_DEFINE(HAS_GTK24, 1, [If gtk+ 2.4.x has been installed, define this])
+   GTK_CFLAGS=$GTK24_CFLAGS
+   GTK_LIBS=$GTK24_LIBS
+   GTK_VERSION=`$PKG_CONFIG gtk+-2.0 --modversion`
+
+   # Search for glib
+   PKG_CHECK_MODULES(GLIB24, glib-2.0 >= 2.4.0, GLIB24="yes", no_GLIB24="yes")
+   if test "$GLIB24" != "yes"
+   then
+       AC_MSG_ERROR([Cannot find glib 2.4.x, install it and rerun ./configure.
+You may find the following error output (if any) useful:
+$GLIB24_PKG_ERRORS
+])
+   fi
+   GLIB_CFLAGS=$GLIB24_CFLAGS
+   GLIB_LIBS=$GLIB24_LIBS
+   GLIB_VERSION=`$PKG_CONFIG glib-2.0 --modversion`
+
+else
+   GTK_VERSION=""
+fi
+
+if test "$GTK_VERSION" = ""
+then
+   AC_MSG_ERROR([Cannot find gtk+ 2.4.x or later, please install gtk+.])
+fi
+
+# 
+# Check for gtk+ 2.4 end
+############################################################################
+
+############################################################################
+# Check for gdk 2.4 or later
+# 
+
+# Check for pkg-config
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test $PKG_CONFIG = no; then
+   AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
+fi
+
+PKG_CHECK_MODULES(GDK, gdk-2.0 >= 2.4.0, GDK="yes", no_GDK="yes")
+
+# This next bit of code figures out what gtk we need to use.
+if test "$GDK" = "yes" 
+then
+
+   AC_DEFINE(HAS_GDK, 1, [If gdk has been installed, define this])
+   GDK_CFLAGS=$GDK_CFLAGS
+   GDK_LIBS=$GDK_LIBS
+   GDK_VERSION=`$PKG_CONFIG gdk-2.0 --modversion`
+
+fi
+
+if test "$GDK_VERSION" = ""
+then
+   AC_MSG_ERROR([Cannot find gdk, please make sure it is installed.])
+fi
+
+# 
+# Check for gdk end
+############################################################################
+
+############################################################################
+# Check for gdk-pixbuf 
+# 
+
+# Check for pkg-config
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test $PKG_CONFIG = no; then
+   AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed and in your PATH])
+fi
+
+PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= 0.15.0, GDK_PIXBUF="yes", no_GDK_PIXBUF="yes")
+
+# This next bit of code figures out what gtk we need to use.
+if test "$GDK_PIXBUF" = "yes" 
+then
+
+   AC_DEFINE(HAS_GDK_PIXBUF, 1, [If gdk-pixbuf has been installed, define this])
+   GDK_PIXBUF_CFLAGS=$GDK_PIXBUF_CFLAGS
+   GDK_PIXBUF_LIBS=$GDK_PIXBUF_LIBS
+   GDK_PIXBUF_VERSION=`$PKG_CONFIG gdk-pixbuf-2.0 --modversion`
+
+fi
+
+if test "$GDK_PIXBUF_VERSION" = ""
+then
+   AC_MSG_ERROR([Cannot find gdk-pixbuf, please make sure it is installed.])
+fi
+
+# 
+# Check for gdk-pixbuf end
+############################################################################
+
+
+
+############################################################################
+# Check for doxygen start
+# 
+
+# Doxygen is a utility for generating html and latex documentation
+# from c source code files.
+
+# search for Doxygen 
+AC_PATH_PROG(DOXYGEN, doxygen, no, ${PATH})
+
+if test "$DOXYGEN" = "no"; then 
+   # doxygen is not available on the system
+   echo "** Cannot find Doxygen! **"
+   echo "**   Documentation creation disabled    **"
+   DOXYGEN=echo
+
+   # prevent from creating html and latex documents.
+   # but does not prevent from processing gschemdoc
+   builddoc=false
+else 
+   # doxygen is available on the system.
+   # now checking if the tools for Texinfo files processing
+   # is installed.
+   # The docs can be either processed to produce dvi, html or info
+   # with texi2dvi, texi2html or makeinfo respectively
+   # Note : these tests on makeinfo and texi2dvi are no more 
+   #        needed as automake makes them for us
+
+   # enable the creation of html and latex documents.
+   builddoc=true
+fi
+
+# depending on variable builddoc, weaving is performed or not
+# using conditionnal in docs/Makefile.in
+AM_CONDITIONAL(BUILDDOC, test x$builddoc = xtrue)
+
+# 
+# Check for doxygen end
+#########################################################################
+
+#########################################################################
+# Checks for header files start
+# 
+
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_HEADER_DIRENT
+AC_CHECK_HEADERS(unistd.h string.h stdlib.h stdarg.h assert.h fcntl.h \
+                 errno.h)
+
+AC_MSG_CHECKING([for optarg in unistd.h])
+AC_TRY_COMPILE(
+[#include <unistd.h>],
+[ char *string = optarg; int i = optind; ],
+optarg_found=yes,
+optarg_found=no)
+AC_MSG_RESULT($optarg_found)
+if test $optarg_found = yes; then
+   AC_DEFINE(OPTARG_IN_UNISTD, 1, [Define if you have optarg in unistd.h])
+fi
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# Checks for library functions.
+AC_TYPE_SIGNAL
+AC_CHECK_FUNCS(getcwd strstr vsnprintf snprintf chown)
+
+# 
+# Checks for header files end
+#########################################################################
+
+#########################################################################
+#
+
+# ------------- dmalloc -------------------
+dnl dmalloc checks
+with_dmalloc="no"
+AC_MSG_CHECKING([if dmalloc debugging should be enabled])
+AC_ARG_ENABLE([dmalloc],
+[  --enable-dmalloc        Compile and link with dmalloc for malloc debugging [[default=no]]],
+[
+if test "X$enable_dmalloc" != "Xno" ; then
+        AC_MSG_RESULT([yes])
+        AC_CHECK_HEADER(dmalloc.h,,
+                AC_ERROR([You have requested dmalloc debugging but dmalloc.h could not be found]))
+        AC_CHECK_LIB(dmalloc,main,,
+                AC_ERROR([You have requested dmalloc debugging but -ldmalloc could not be found]))
+        DMALLOC_LIBS="-ldmalloc"
+        with_dmalloc="yes"
+else
+        AC_MSG_RESULT([no])
+        DMALLOC_LIBS=""
+fi
+],
+[
+        AC_MSG_RESULT([no])
+        DMALLOC_LIBS=""
+])
+
+# ------------- ElectricFence -------------------
+dnl ElectricFence checks
+with_efence="no"
+AC_MSG_CHECKING([if ElectricFence debugging should be enabled])
+AC_ARG_ENABLE([efence],
+[  --enable-efence         Link with ElectricFence for malloc debugging [[default=no]]],
+[
+if test "X$enable_efence" != "Xno" ; then
+        AC_MSG_RESULT([yes])
+        AC_CHECK_LIB(efence,main,,
+                AC_ERROR([You have requested ElectricFence debugging but -lefence could not be found]))
+        with_efence="yes"
+else
+        AC_MSG_RESULT([no])
+fi
+],
+[
+AC_MSG_RESULT([no])
+])
+
+#
+#########################################################################
+
+#########################################################################
+# gEDA/gaf specific setup start
+#
+
+DATADIR=gEDA
+GEDADATADIR=$datadir/$DATADIR
+
+if eval "test x$opt_rcdir = x"; then
+	# path was not specified with --with-rcdir
+        AC_DEFINE_UNQUOTED(GEDARCDIR, "none", [gEDA/gaf's rc directory])
+	GEDARCDIR=$GEDADATADIR
+else
+	# path WAS specified with --with-rcdir
+        AC_DEFINE_UNQUOTED(GEDARCDIR, "$opt_rcdir", [gEDA/gaf's rc directory])
+	GEDARCDIR="$opt_rcdir"
+fi
+
+if test x$opt_xdgdir = x; then
+        # path was not specified with --with-xdgdir
+        XDGDIR='${datarootdir}'
+else
+        # path WAS specified with --with-xdgdir
+        #AC_DEFINE_UNQUOTED(XDGDIR, "$opt_xdgdir", [gEDA/gaf's rc directory])
+        XDGDIR="$opt_xdgdir"
+fi
+AC_SUBST(XDGDIR)
+
+if test x$opt_kdedir = x; then
+        # path was not specified with --with-kdedir
+        KDEDIR='${prefix}'
+else
+        # path WAS specified with --with-kdedir
+        KDEDIR="$opt_kdedir"
+fi
+AC_SUBST(KDEDIR)
+
+# Defs for libary symbol files
+#
+# Expand the prefix variable
+if eval "test x$prefix = xNONE"; then
+ dprefix=$ac_default_prefix
+else
+ dprefix=$prefix
+fi
+
+gedatopdir=$dprefix/share/$DATADIR
+expandgedadatadir=`echo $gedatopdir`
+
+# this has to be expanded ( no ${prefix} ) --
+AC_DEFINE_UNQUOTED(GEDADATADIR, "$gedatopdir", [gEDA/gaf's data directory])
+AC_DEFINE_UNQUOTED(DATE_VERSION, "$DATE_VERSION", [Currently running date version of gEDA/gaf])
+AC_DEFINE_UNQUOTED(DOTTED_VERSION, "$DOTTED_VERSION", [Currently running dotted version of gEDA/gaf])
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this program's package])
+
+#
+# gEDA/gaf specify things which need to setup
+#########################################################################
+
+#########################################################################
+# Update mime database utility start
+#
+# Adapted from gnome-control-center.
+#
+
+AC_ARG_ENABLE(update-mime-database,
+   AC_HELP_STRING([--disable-update-mime-database],
+                   [do not update mime database after installation]),,
+                   enable_update_mime_database=yes)
+
+AM_CONDITIONAL(ENABLE_UPDATE_MIME_DATABASE,
+               test x$enable_update_mime_database = xyes)
+
+if test x$enable_update_mime_database = xyes ; then
+  AC_PATH_PROG(UPDATE_MIME_DATABASE, [update-mime-database], no)
+  if test $UPDATE_MIME_DATABASE = no; then
+     AC_MSG_ERROR([Cannot find update-mime-database, make sure it is installed and in your PATH, or configure with --disable-update-mime-database])
+  fi
+fi
+
+#
+# Update mime database utility end
+#########################################################################
+
+# Finally create the final CFLAGS and LDFLAGS for use in the makefiles
+LIBGEDA_CFLAGS="$MINGW_CFLAGS $GUILE_CFLAGS $GTK_CFLAGS $X_CFLAGS $GDK_PIXBUF_CFLAGS $GDK_CFLAGS"
+LIBGEDA_LDFLAGS="$GUILE_LDFLAGS $GLIB_LIBS $DMALLOC_LIBS $GDK_PIXBUF_LIBS $GDK_LIBS"
+LIBTOOL_FLAGS="-version-info $SHARED_LIBRARY_VERSION"
+
+# Makefile.in variable substitution
+AC_SUBST(DATE_VERSION)
+AC_SUBST(DOTTED_VERSION)
+AC_SUBST(LIBGEDA_CFLAGS)
+AC_SUBST(LIBGEDA_LDFLAGS)
+AC_SUBST(LIBTOOL_FLAGS)
+AC_SUBST(GEDADATADIR)
+AC_SUBST(GEDARCDIR)
+AC_SUBST(PATHSEP)
+AC_SUBST(OTHERPATHSEP)
+AC_SUBST(GUILEINTERP)
+AC_SUBST(INDENT)
+
+# Create all the necessary derived files
+AC_CONFIG_FILES([Makefile
+                 src/Makefile
+                 scripts/Makefile
+                 include/Makefile
+                 docs/Makefile
+                 data/Makefile
+                 intl/Makefile
+                 po/Makefile.in
+                 po/Makefile
+	         libgeda.pc
+		 share/Makefile
+		 lib/Makefile
+		 scheme/Makefile ])
+
+AC_OUTPUT
+
+expandedGEDADATADIR=`eval "echo $GEDADATADIR"`
+expandedGEDARCDIR=`eval "echo $GEDARCDIR"`
+expandedXDGDIR=`eval "echo $XDGDIR"`
+
+AC_MSG_RESULT([
+** Configuration summary for $PACKAGE $DOTTED_VERSION.$DATE_VERSION
+
+   GLIB library version:             $GLIB_VERSION
+   GTK+ library version:             $GTK_VERSION
+   GUILE library version:            $GUILE_VERSION
+   GDK-PIXBUF (png output):          $GDK_PIXBUF_VERSION
+   mingw build:                      $MINGW
+   data directory:                   $expandedGEDADATADIR
+   rc directory:                     $expandedGEDARCDIR
+   xdg directory:                    $expandedXDGDIR
+   KDE directory:                    $KDEDIR
+   LIBGEDA .so version:              $SHARED_LIBRARY_VERSION
+   dmalloc debugging:                $with_dmalloc
+   ElectricFence debugging:          $with_efence
+])
+




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs