]> www.wagner.pp.ru Git - oss/fgis.git/blob - configure.ac
7144af3fe706a97c4e2d79d1ca20caf822330f58
[oss/fgis.git] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(fGIS, 0.0.1, dron@remotesensing.org)
3 # AC_CONFIG_HEADERS([config.h])
4 AM_INIT_AUTOMAKE
5 # AC_CONFIG_SRCDIR([include/regex.h])
6 AM_CONFIG_HEADER(include/config.h)
7
8 dnl Checks for programs.
9 AC_LIBTOOL_DLOPEN
10 AC_PROG_LIBTOOL
11 AC_PROG_YACC
12 AC_PROG_CC
13 AC_PROG_MAKE_SET
14
15 # Checks for libraries.
16 # FIXME: Replace `main' with a function in `-lX11':
17 # AC_CHECK_LIB([X11], [main])
18 # FIXME: Replace `main' with a function in `-ldl':
19 # AC_CHECK_LIB([dl], [main])
20 # FIXME: Replace `main' with a function in `-lefence':
21 # AC_CHECK_LIB([efence], [main])
22 # FIXME: Replace `main' with a function in `-lepp':
23 # AC_CHECK_LIB([epp], [main])
24 # FIXME: Replace `main' with a function in `-lm':
25 # AC_CHECK_LIB([m], [main])
26 # FIXME: Replace `main' with a function in `-lproj':
27 # AC_CHECK_LIB([proj], [main])
28
29 # Checks for header files.
30 AC_PATH_X
31 AC_FUNC_ALLOCA
32 AC_HEADER_STDC
33 AC_CHECK_HEADERS([limits.h malloc.h stddef.h stdlib.h string.h strings.h unistd.h])
34
35 # Checks for typedefs, structures, and compiler characteristics.
36 AC_C_CONST
37 AC_TYPE_SIZE_T
38 AC_STRUCT_TM
39
40 # Checks for library functions.
41 AC_FUNC_ERROR_AT_LINE
42 AC_FUNC_MALLOC
43 AC_FUNC_MMAP
44 AC_TYPE_SIGNAL
45 AC_FUNC_STAT
46 AC_FUNC_STRTOD
47 AC_FUNC_VPRINTF
48 AC_CHECK_FUNCS([bzero floor ftruncate memmove memset munmap re_comp regcomp sqrt strchr strdup strrchr strtol])
49
50 AC_DEFINE_UNQUOTED(FGIS_CONFIG, "$sysconfdir", [Define this to the location of the global config file])
51
52 dnl ---------------------------------------------------------------------------
53 dnl Check for Tcl/Tk installation
54 dnl ---------------------------------------------------------------------------
55
56 AC_ARG_WITH(tcl,[  --with-tcl[=ARG]          Include Tcl support (ARG=yes or path)],,)
57 if test "$with_tcl" = "yes" -o "$with_tcl" = "" ; then
58
59   AC_CHECK_LIB(tcl8.3,Tcl_CreateCommand,HAVE_TCL83=yes,HAVE_TCL83=no,$LIBS)
60
61   if test "HAVE_TCL83"="yes"; then
62
63     if test -r /usr/include/tcl8.3/tcl.h ; then
64           
65       LIBS="-ltcl8.3 $LIBS"
66       TCL_INCLUDE="-I/usr/include/tcl8.3"
67       echo "using Tcl 8.3"
68       
69     fi
70
71   fi
72
73 fi
74
75 AC_SUBST(TCL_INCLUDE,$TCL_INCLUDE)
76
77 AC_CONFIG_FILES([Makefile
78                  dll/Makefile
79                  epu/Makefile
80                  include/Makefile
81                  tcl/Makefile])
82 AC_OUTPUT