aaah bah - move to 05 not 04
[framework/uifw/embryo.git] / configure.ac
1 # get rid of that stupid cache mechanism
2 rm -f config.cache
3
4 AC_INIT([embryo], [0.9.9.063], [enlightenment-devel@lists.sourceforge.net])
5 release="ver-svn-05"
6 AC_PREREQ([2.52])
7 AC_CONFIG_SRCDIR([configure.ac])
8 AC_CONFIG_MACRO_DIR([m4])
9 AC_CANONICAL_BUILD
10 AC_CANONICAL_HOST
11 AC_ISC_POSIX
12
13 AM_INIT_AUTOMAKE([1.6 dist-bzip2])
14 AM_CONFIG_HEADER([config.h])
15 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
16
17 AC_LIBTOOL_WIN32_DLL
18 define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
19 define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
20 AC_PROG_LIBTOOL
21
22 VMAJ=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $1);}'`
23 VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
24 VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
25 SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
26 version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
27 AC_SUBST(version_info)
28
29 case "$host_os" in
30    mingw32ce* | cegcc*)
31       ;;
32    *)
33       release_info="-release $release"
34       ;;
35 esac
36 AC_SUBST(release_info)
37
38
39 ### Default options with respect to host
40
41 requirement_embryo=""
42 embryoincludedir="${datadir}/include"
43
44
45 ### Additional options to configure
46
47
48 ### Checks for programs
49 AC_PROG_CC
50
51 # doxygen program for documentation building
52
53 EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
54
55 # pkg-config
56
57 PKG_PROG_PKG_CONFIG
58
59 # Check whether pkg-config supports Requires.private
60 if $PKG_CONFIG --atleast-pkgconfig-version 0.22; then
61    pkgconfig_requires_private="Requires.private"
62 else
63    pkgconfig_requires_private="Requires"
64 fi
65 AC_SUBST(pkgconfig_requires_private)
66
67
68 ### Checks for libraries
69
70 # Evil library for compilation on Windows
71
72 EFL_EMBRYO_BUILD=""
73 case "$host_os" in
74    mingw* | cegcc*)
75    PKG_CHECK_MODULES([EVIL], [evil])
76    AC_DEFINE(HAVE_EVIL, 1, [Set to 1 if Evil library is installed])
77    requirement_embryo="evil ${requirement_embryo}"
78    EFL_EMBRYO_BUILD="-DEFL_EMBRYO_BUILD"
79    ;;
80 esac
81 AC_SUBST(EFL_EMBRYO_BUILD)
82
83
84 ### Checks for header files
85
86 AC_CHECK_HEADER([fnmatch.h],
87    [dummy="yes"],
88    [AC_MSG_ERROR([Cannot find fnmatch.h. Make sure your CFLAGS environment variable contains include lines for the location of this file. MinGW users: see the INSTALL file])])
89
90
91 ### Checks for types
92
93
94 ### Checks for structures
95
96
97 ### Checks for compiler characteristics
98 AC_C_BIGENDIAN
99 AM_PROG_CC_C_O
100 AC_C_CONST
101 AC_C_INLINE
102 AC_PROG_CC_STDC
103 AC_HEADER_STDC
104 AC_C___ATTRIBUTE__
105
106 EMBRYO_CPPFLAGS=""
107 EMBRYO_CFLAGS=""
108 case "$host_os" in
109    mingw32ce*)
110       EMBRYO_CPPFLAGS="-D_WIN32_WCE=0x0420"
111       ;;
112    cegcc*)
113       EMBRYO_CPPFLAGS="-D_WIN32_WCE=0x0420"
114       EMBRYO_CFLAGS="-mwin32"
115       ;;
116 esac
117 AC_SUBST(EMBRYO_CPPFLAGS)
118 AC_SUBST(EMBRYO_CFLAGS)
119
120
121 ### Checks for linker characteristics
122
123 lt_enable_auto_import=""
124 case "$host_os" in
125    mingw* | cegcc*)
126       lt_enable_auto_import="-Wl,--enable-auto-import"
127       ;;
128 esac
129 AC_SUBST(lt_enable_auto_import)
130
131
132 ### Checks for library functions
133 AC_FUNC_ALLOCA
134
135 case "$host_os" in
136    mingw* | cegcc*)
137       AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defined to 1 (MinGW / CeGCC platform)])
138       ;;
139    *)
140       AC_CHECK_FUNCS(gettimeofday)
141       ;;
142 esac
143
144 fnmatch_libs=""
145 AC_CHECK_FUNCS([fnmatch], [res="yes"], [res="no"])
146 if test "x$res" = "xno"; then
147    AC_SEARCH_LIBS([fnmatch],
148       [fnmatch evil iberty],
149       [res="yes"],
150       [res="no"])
151    if test "x$res" = "xno"; then
152       AC_MSG_ERROR([Cannot find fnmatch() in neither libc nor libfnmatch, nor libiberty, nor libevil])
153    fi
154    fnmatch_libs="${ac_cv_search_fnmatch}"
155 fi
156 AC_SUBST(fnmatch_libs)
157
158
159 AC_SUBST(requirement_embryo)
160 AC_SUBST(embryoincludedir)
161
162 AC_OUTPUT([
163 Makefile
164 doc/Makefile
165 doc/embryo.dox
166 embryo.pc
167 include/Makefile
168 src/Makefile
169 src/lib/Makefile
170 src/bin/Makefile
171 README
172 embryo.spec
173 ])
174
175
176 #####################################################################
177 ## Info
178
179 echo
180 echo
181 echo
182 echo "------------------------------------------------------------------------"
183 echo "$PACKAGE $VERSION"
184 echo "------------------------------------------------------------------------"
185 echo
186 echo "Configuration Options Summary:"
187 echo
188 echo "  Documentation........: ${build_doc}"
189 echo
190 echo "  Compilation..........: make"
191 echo
192 echo "  Installation.........: make install"
193 echo
194 echo "    prefix.............: $prefix"
195 echo