/[estron]/trunk/dwi/configure.in
ViewVC logotype

Contents of /trunk/dwi/configure.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 344 - (show annotations) (download)
Mon Jul 19 04:19:17 2004 UTC (8 years, 10 months ago) by linas
File size: 4712 byte(s)
convert over to automake infrastructure
1 ## -*-m4-*-
2
3 dnl Process this file with autoconf to produce a configure script.
4
5 # FILE:
6 # configure.in for the DWI package
7 #
8 # FUNCTION:
9 # implements checks for a variety of system-specific functions
10 #
11
12 AC_INIT(dwi)
13 AM_INIT_AUTOMAKE(dwi,0.6.0)
14
15 AC_PROG_INTLTOOL
16
17 AC_PROG_LIBTOOL
18
19 AM_CONFIG_HEADER(config.h)
20
21 AM_MAINTAINER_MODE
22
23 AC_ISC_POSIX
24 AC_PROG_CXX
25 AC_PROG_CC
26 AC_PROG_CPP
27 AC_STDC_HEADERS
28 AC_PROG_YACC
29 AC_PROG_INSTALL
30 AC_PROG_LN_S
31 AC_PROG_MAKE_SET
32
33 AC_PATH_XTRA
34
35 dnl *****************************************
36 dnl pkg-config check time
37 dnl *****************************************
38
39 dnl LIBGNOMEVFS_REQUIRED=2.0.0
40 LIBXML2_REQUIRED=2.0.0
41
42 AM_PATH_GLIB_2_0("2.0.0", , ,gobject)
43
44 dnl **************************************************************
45 dnl libxml2
46 dnl The libxml2 library is required only if the serializer/xml
47 dnl backend is used. Should probably dynamic-load this thing?
48 dnl **************************************************************
49
50 PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED)
51 AC_SUBST(LIBXML2_CFLAGS)
52 AC_SUBST(LIBXML2_LIBS)
53
54 dnl **************************************************************
55 dnl Stuff needed to build the example progs only ...
56 dnl XXX should fix this so that not required if not building examples.
57 dnl **************************************************************
58
59 GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
60 GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`
61 AC_SUBST(GTK_CFLAGS)
62 AC_SUBST(GTK_LIBS)
63
64 dnl **************************************************************
65 dnl Checks for typedefs, structures, and compiler characteristics.
66 dnl **************************************************************
67
68 AC_C_CONST
69 AC_C_INLINE
70 AC_TYPE_OFF_T
71 AC_TYPE_PID_T
72 AC_TYPE_SIZE_T
73 AC_STRUCT_ST_RDEV
74 AC_HEADER_TIME
75 AC_STRUCT_TM
76 AC_TYPE_UID_T
77
78 dnl *****************************
79 dnl Checks for library functions.
80 dnl *****************************
81
82 AC_FUNC_STRFTIME
83 AC_CHECK_FUNCS(getcwd gettimeofday getwd stpcpy strdup strtoul)
84 AC_REPLACE_FUNCS(strptime localtime_r)
85
86
87 dnl *******************************
88 dnl Internationalization
89 dnl *******************************
90
91 ALL_LINGUAS=" "
92 GETTEXT_PACKAGE=dwi-0.6
93 AC_SUBST(GETTEXT_PACKAGE)
94 AM_GLIB_GNU_GETTEXT
95
96
97 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
98 [Define the gettext package.])
99
100 # check for doxygen, mostly stolen from http://log4cpp.sourceforge.net/
101 # ----------------------------------------------------------------------------
102 AC_DEFUN(BB_ENABLE_DOXYGEN,
103 [
104 AC_ARG_ENABLE(doxygen, [ --enable-doxygen enable documentation generation with doxygen (auto)])
105 AC_ARG_ENABLE(dot, [ --enable-dot use 'dot' to generate graphs in doxygen (auto)])
106 AC_ARG_ENABLE(html-docs, [ --enable-html-docs enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
107 AC_ARG_ENABLE(latex-docs, [ --enable-latex-docs enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no])
108 if test "x$enable_doxygen" = xno; then
109 enable_doc=no
110 else
111 AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
112 if test x$DOXYGEN = x; then
113 if test "x$enable_doxygen" = xyes; then
114 AC_MSG_ERROR([could not find doxygen])
115 fi
116 enable_doc=no
117 else
118 enable_doc=yes
119 AC_PATH_PROG(DOT, dot, , $PATH)
120 fi
121 fi
122 AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
123
124 if test x$DOT = x; then
125 if test "x$enable_dot" = xyes; then
126 AC_MSG_ERROR([could not find dot])
127 fi
128 enable_dot=no
129 else
130 enable_dot=yes
131 fi
132 AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue)
133 AC_SUBST(enable_dot)
134 AC_SUBST(enable_html_docs)
135 AC_SUBST(enable_latex_docs)
136 ])
137
138 # check for doxygen
139 BB_ENABLE_DOXYGEN
140 # ----------------------------------------------------------------------------
141
142 AC_SUBST(CFLAGS)
143 AC_SUBST(CPPFLAGS)
144 AC_SUBST(LDFLAGS)
145
146 AC_OUTPUT([
147 Makefile
148 app/Makefile
149 db_drivers/Makefile
150 dwi/Makefile
151 dwi-gtk/Makefile
152 dwi-qof/Makefile
153 examples/Makefile
154 examples/app-integration/Makefile
155 examples/basic-gobj/Makefile
156 examples/basic-qof/Makefile
157 examples/bike-calc/Makefile
158 src/Makefile
159 dwi-0.pc
160 ])
161
162 dnl <= Configuration summary =>
163
164 echo ""
165 echo "dwi configuration summary:"
166 echo "=================================="
167 echo ""
168
169 dnl <= CFLAGS and LDFLAGS =>
170 echo "CFLAGS : $CFLAGS"
171 echo "LDFLAGS : $LDFLAGS"
172 echo ""
173
174 dnl <= Prefixes =>
175 echo "prefix : $prefix"
176 # echo "sysconf dir : "`eval echo $sysconfdir`
177 # echo "bin dir : "`eval echo $bindir`
178 echo "data dir : "`eval echo $datadir`
179 echo "include dir : "`eval echo $includedir`
180 echo "lib dir : "`eval echo $libdir`
181 echo ""
182
183
184 echo ""
185 dnl <= End of configuration summary =>

  ViewVC Help
Powered by ViewVC 1.1.5