]> www.wagner.pp.ru Git - oss/fgis.git/blobdiff - configure.ac
The first attempt to automate building process
[oss/fgis.git] / configure.ac
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..7144af3
--- /dev/null
@@ -0,0 +1,82 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT(fGIS, 0.0.1, dron@remotesensing.org)
+# AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE
+# AC_CONFIG_SRCDIR([include/regex.h])
+AM_CONFIG_HEADER(include/config.h)
+
+dnl Checks for programs.
+AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
+AC_PROG_YACC
+AC_PROG_CC
+AC_PROG_MAKE_SET
+
+# Checks for libraries.
+# FIXME: Replace `main' with a function in `-lX11':
+# AC_CHECK_LIB([X11], [main])
+# FIXME: Replace `main' with a function in `-ldl':
+# 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':
+# AC_CHECK_LIB([proj], [main])
+
+# Checks for header files.
+AC_PATH_X
+AC_FUNC_ALLOCA
+AC_HEADER_STDC
+AC_CHECK_HEADERS([limits.h malloc.h stddef.h stdlib.h string.h strings.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+AC_STRUCT_TM
+
+# Checks for library functions.
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_MALLOC
+AC_FUNC_MMAP
+AC_TYPE_SIGNAL
+AC_FUNC_STAT
+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 ---------------------------------------------------------------------------
+
+AC_ARG_WITH(tcl,[  --with-tcl[=ARG]          Include Tcl support (ARG=yes or path)],,)
+if test "$with_tcl" = "yes" -o "$with_tcl" = "" ; then
+
+  AC_CHECK_LIB(tcl8.3,Tcl_CreateCommand,HAVE_TCL83=yes,HAVE_TCL83=no,$LIBS)
+
+  if test "HAVE_TCL83"="yes"; then
+
+    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
+
+  fi
+
+fi
+
+AC_SUBST(TCL_INCLUDE,$TCL_INCLUDE)
+
+AC_CONFIG_FILES([Makefile
+                 dll/Makefile
+                 epu/Makefile
+                 include/Makefile
+                 tcl/Makefile])
+AC_OUTPUT