]> www.wagner.pp.ru Git - oss/fgis.git/blob - configure.ac
118885ee67ed0fd65d5ae82d8949c605ac11f006
[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 `-lm':
23 # AC_CHECK_LIB([m], [main])
24 # FIXME: Replace `main' with a function in `-lproj':
25 # AC_CHECK_LIB([proj], [main])
26
27 # Checks for header files.
28 AC_PATH_X
29 AC_FUNC_ALLOCA
30 AC_HEADER_STDC
31 AC_CHECK_HEADERS([limits.h malloc.h stddef.h stdlib.h string.h strings.h unistd.h])
32
33 # Checks for typedefs, structures, and compiler characteristics.
34 AC_C_CONST
35 AC_TYPE_SIZE_T
36 AC_STRUCT_TM
37
38 # Checks for library functions.
39 AC_FUNC_ERROR_AT_LINE
40 AC_FUNC_MALLOC
41 AC_FUNC_MMAP
42 AC_TYPE_SIGNAL
43 AC_FUNC_STAT
44 AC_FUNC_STRTOD
45 AC_FUNC_VPRINTF
46 AC_CHECK_FUNCS([bzero floor ftruncate memmove memset munmap re_comp regcomp sqrt strchr strdup strrchr strtol])
47
48 dnl ---------------------------------------------------------------------------
49 dnl Handle global configuration file placement
50 dnl ---------------------------------------------------------------------------
51
52 AC_DEFINE_DIR(FGIS_CONFIG, "$sysconfdir", [Define this to the location of the global config file])
53
54 dnl ---------------------------------------------------------------------------
55 dnl Handle placement of the engine module (fgis.so)
56 dnl ---------------------------------------------------------------------------
57
58 AC_SUBST_DIR(FGIS_LIBDIR,"$libdir")
59
60 dnl ---------------------------------------------------------------------------
61 dnl Check for Tcl/Tk installation
62 dnl ---------------------------------------------------------------------------
63
64 CY_AC_PATH_TCLH
65 if test x"$no_tcl" = x"true" ; then
66     echo "      ERROR: Can't find Tcl headers or library."
67     echo "      See README for information on how to obtain Tcl."
68     echo "      If Tcl is installed, see INSTALL on how to tell"
69     echo "      configure where Tcl is installed."
70     exit 1
71 fi
72 CY_AC_PATH_TCLCONFIG
73 CY_AC_LOAD_TCLCONFIG
74 AC_SUBST(TCL_INC_DIR,$TCL_INC_DIR)
75 AC_SUBST(TCL_PACKAGE_PATH,$TCL_PACKAGE_PATH)
76
77 CY_AC_PATH_TKH
78 CY_AC_PATH_TKCONFIG
79 CY_AC_LOAD_TKCONFIG
80 AC_SUBST(TK_INC_DIR,$TK_INC_DIR)
81 if [[ $TK_VERSION < "8.4" ]]; then
82     AC_DEFINE([TK_84PREV], [0], [Define this variable if your Tk version less then 8.4])
83 fi
84
85 AC_CONFIG_FILES([Makefile
86                  dll/Makefile
87                  epu/Makefile
88                  include/Makefile
89                  lib/Makefile
90                  tcl/Makefile
91                  tcl/pkgIndex.tcl])
92 AC_OUTPUT