]> www.wagner.pp.ru Git - oss/fgis.git/blobdiff - configure.ac
The second attempt to automate building :-) A lot of work here should be
[oss/fgis.git] / configure.ac
index 7144af3fe706a97c4e2d79d1ca20caf822330f58..964b8db4878f3adc809c1bd1f0c86c90b1d6ac12 100644 (file)
@@ -19,8 +19,6 @@ AC_PROG_MAKE_SET
 # AC_CHECK_LIB([dl], [main])
 # FIXME: Replace `main' with a function in `-lefence':
 # AC_CHECK_LIB([efence], [main])
-# FIXME: Replace `main' with a function in `-lepp':
-# AC_CHECK_LIB([epp], [main])
 # FIXME: Replace `main' with a function in `-lm':
 # AC_CHECK_LIB([m], [main])
 # FIXME: Replace `main' with a function in `-lproj':
@@ -47,36 +45,45 @@ AC_FUNC_STRTOD
 AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([bzero floor ftruncate memmove memset munmap re_comp regcomp sqrt strchr strdup strrchr strtol])
 
-AC_DEFINE_UNQUOTED(FGIS_CONFIG, "$sysconfdir", [Define this to the location of the global config file])
-
 dnl ---------------------------------------------------------------------------
-dnl Check for Tcl/Tk installation
+dnl Handle global configuration file placement
 dnl ---------------------------------------------------------------------------
 
-AC_ARG_WITH(tcl,[  --with-tcl[=ARG]          Include Tcl support (ARG=yes or path)],,)
-if test "$with_tcl" = "yes" -o "$with_tcl" = "" ; then
+AC_DEFINE_DIR(FGIS_CONFIG, "$sysconfdir", [Define this to the location of the global config file])
 
-  AC_CHECK_LIB(tcl8.3,Tcl_CreateCommand,HAVE_TCL83=yes,HAVE_TCL83=no,$LIBS)
-
-  if test "HAVE_TCL83"="yes"; then
+dnl ---------------------------------------------------------------------------
+dnl Handle placement of the engine module (fgis.so)
+dnl ---------------------------------------------------------------------------
 
-    if test -r /usr/include/tcl8.3/tcl.h ; then
-         
-      LIBS="-ltcl8.3 $LIBS"
-      TCL_INCLUDE="-I/usr/include/tcl8.3"
-      echo "using Tcl 8.3"
-      
-    fi
+AC_SUBST_DIR(FGIS_LIBDIR,"$libdir")
 
-  fi
+dnl ---------------------------------------------------------------------------
+dnl Check for Tcl/Tk installation
+dnl ---------------------------------------------------------------------------
 
+CY_AC_PATH_TCLH
+if test x"$no_tcl" = x"true" ; then
+    echo "     ERROR: Can't find Tcl headers or library."
+    echo "     See README for information on how to obtain Tcl."
+    echo "     If Tcl is installed, see INSTALL on how to tell"
+    echo "     configure where Tcl is installed."
+    exit 1
 fi
+CY_AC_PATH_TCLCONFIG
+CY_AC_LOAD_TCLCONFIG
+AC_SUBST(TCL_INC_DIR,$TCL_INC_DIR)
+AC_SUBST(TCL_PACKAGE_PATH,$TCL_PACKAGE_PATH)
 
-AC_SUBST(TCL_INCLUDE,$TCL_INCLUDE)
+CY_AC_PATH_TKH
+CY_AC_PATH_TKCONFIG
+CY_AC_LOAD_TKCONFIG
+AC_SUBST(TK_INC_DIR,$TK_INC_DIR)
 
 AC_CONFIG_FILES([Makefile
                  dll/Makefile
                  epu/Makefile
                  include/Makefile
-                 tcl/Makefile])
+                 lib/Makefile
+                 tcl/Makefile
+                tcl/pkgIndex.tcl])
 AC_OUTPUT