]> www.wagner.pp.ru Git - oss/fgis.git/blob - configure.ac
created
[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 AM_INIT_AUTOMAKE
4 AM_CONFIG_HEADER(include/config.h)
5
6 dnl Checks for programs.
7 AC_LIBTOOL_DLOPEN
8 AC_PROG_LIBTOOL
9 AC_PROG_YACC
10 AC_PROG_CC
11 AC_PROG_MAKE_SET
12
13 # Checks for libraries.
14 # FIXME: Replace `main' with a function in `-lX11':
15 # AC_CHECK_LIB([X11], [main])
16 # FIXME: Replace `main' with a function in `-ldl':
17 # AC_CHECK_LIB([dl], [main])
18 # FIXME: Replace `main' with a function in `-lefence':
19 # AC_CHECK_LIB([efence], [main])
20 # FIXME: Replace `main' with a function in `-lm':
21 # AC_CHECK_LIB([m], [main])
22 # FIXME: Replace `main' with a function in `-lproj':
23 # AC_CHECK_LIB([proj], [main])
24
25 # Checks for header files.
26 AC_PATH_X
27 AC_FUNC_ALLOCA
28 AC_HEADER_STDC
29 AC_CHECK_HEADERS([limits.h malloc.h stddef.h stdlib.h string.h strings.h unistd.h])
30
31 # Checks for typedefs, structures, and compiler characteristics.
32 AC_C_CONST
33 AC_TYPE_SIZE_T
34 AC_STRUCT_TM
35
36 # Checks for library functions.
37 AC_FUNC_ERROR_AT_LINE
38 AC_FUNC_MALLOC
39 AC_FUNC_MMAP
40 AC_TYPE_SIGNAL
41 AC_FUNC_STAT
42 AC_FUNC_STRTOD
43 AC_FUNC_VPRINTF
44 AC_CHECK_FUNCS([bzero floor ftruncate memmove memset munmap re_comp regcomp sqrt strchr strdup strrchr strtol])
45
46 dnl ---------------------------------------------------------------------------
47 dnl Handle global configuration file placement
48 dnl ---------------------------------------------------------------------------
49
50 dnl FIXME: won't works
51 dnl AC_DEFINE_DIR(FGIS_CONFDIR, "$sysconfdir", [Define this to the location of the global config file])
52 AC_SUBST_DIR(FGIS_CONFDIR,"$sysconfdir")
53 AC_DEFINE_UNQUOTED(FGIS_CONFDIR,"$FGIS_CONFDIR",[Define this to the location of the global config file])
54 AC_SUBST(FGIS_CONFDIR,$FGIS_CONFDIR)
55
56 dnl ---------------------------------------------------------------------------
57 dnl Handle placement of the engine module (fgis.so)
58 dnl ---------------------------------------------------------------------------
59
60 AC_SUBST_DIR(FGIS_LIBDIR,"$libdir")
61 AC_SUBST(FGIS_LIBDIR,$FGIS_LIBDIR)
62
63 dnl ---------------------------------------------------------------------------
64 dnl Handle placement of the fGIS Tcl/Tk modules
65 dnl ---------------------------------------------------------------------------
66
67 AC_SUBST_DIR(FGIS_SCRIPTDIR,"$libdir/fgis/tcl")
68 AC_SUBST(FGIS_SCRIPTDIR,$FGIS_SCRIPTDIR)
69
70 dnl ---------------------------------------------------------------------------
71 dnl Define path for EPPL7 library sources. Temporary hack, the whole this
72 dnl library will be removed soon
73 dnl ---------------------------------------------------------------------------
74
75 AC_SUBST(LIBEPP,../lib/libepp.la)
76
77 dnl ---------------------------------------------------------------------------
78 dnl Check for Tcl/Tk installation
79 dnl ---------------------------------------------------------------------------
80
81 CY_AC_PATH_TCLH
82 if test x"$no_tcl" = x"true" ; then
83     echo "      ERROR: Can't find Tcl headers or library."
84     echo "      See README for information on how to obtain Tcl."
85     echo "      If Tcl is installed, see INSTALL on how to tell"
86     echo "      configure where Tcl is installed."
87     exit 1
88 fi
89 CY_AC_PATH_TCLCONFIG
90 CY_AC_LOAD_TCLCONFIG
91 AC_SUBST(TCL_INC_DIR,$TCL_INC_DIR)
92 AC_SUBST(TCL_PACKAGE_PATH,$TCL_PACKAGE_PATH)
93
94 CY_AC_PATH_TKH
95 CY_AC_PATH_TKCONFIG
96 CY_AC_LOAD_TKCONFIG
97 AC_SUBST(TK_INC_DIR,$TK_INC_DIR)
98 if [[[ $TK_VERSION < "8.4" ]]]; then
99     AC_DEFINE([TK_84PREV], , [Define this variable if your Tk version less then 8.4])
100 fi
101
102 AC_CONFIG_FILES([Makefile
103                  etc/Makefile
104                  etc/fgis.rc
105                  dll/Makefile
106                  epu/Makefile
107                  include/Makefile
108                  lib/Makefile
109                  tcl/Makefile
110                  tcl/pkgIndex.tcl])
111 AC_OUTPUT
112