1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
1 |
# -*- Autoconf -*- |
2 |
# Process this file with autoconf to produce a configure script. |
|
3 |
||
4 |
#dnl Package version information |
|
5 |
BUILD_DATE=`date +%d-%m-%Y` |
|
6 |
||
7 |
AC_PREREQ(2.59) |
|
8 |
||
79.1.3
by Michel Van Eeckhout
Adding internationalisation support. Still need library source code |
9 |
m4_define(libecbufr_version_major, 0) |
10 |
m4_define(libecbufr_version_minor, 8) |
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
11 |
# An odd micro number indicates in-progress development, (eg. from git/cvs) |
12 |
# An even micro number indicates a released version. |
|
286
by Christophe Beauregard
update the revision number of trunk to 0.8.7 (i.e. >0.8.6) |
13 |
m4_define(libecbufr_version_micro, 7) |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
14 |
|
262
by Vanh Souvanlasy
removed some noise from reconf |
15 |
AC_INIT(libecbufr, libecbufr_version_major.libecbufr_version_minor.libecbufr_version_micro,[https://launchpad.net/~libecbufr-dev]) |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
16 |
|
92
by Christophe Beauregard
Fix for bug #566821 and cleanups to packaging process. With these changes, |
17 |
AC_CONFIG_MACRO_DIR([m4]) |
94
by Christophe Beauregard
fix for bug #566821 to get it working in Debian sarge. |
18 |
AC_CONFIG_AUX_DIR(./) |
92
by Christophe Beauregard
Fix for bug #566821 and cleanups to packaging process. With these changes, |
19 |
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
20 |
AC_PREFIX_DEFAULT(/usr) |
79.1.3
by Michel Van Eeckhout
Adding internationalisation support. Still need library source code |
21 |
AC_CONFIG_SRCDIR([API/Sources/bufr_io.c]) |
22 |
AC_CONFIG_HEADERS([config.h]) |
|
23 |
#AM_CONFIG_HEADER(config.h) # This is obsolete |
|
24 |
#AM_INIT_AUTOMAKE(ECBUFR, 0.8.2) # This is obsolete |
|
25 |
AM_INIT_AUTOMAKE
|
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
26 |
|
27 |
# use these version macros in Makefile.am |
|
79.1.3
by Michel Van Eeckhout
Adding internationalisation support. Still need library source code |
28 |
VERSION_MAJOR=libecbufr_version_major |
29 |
VERSION_MINOR=libecbufr_version_minor |
|
30 |
VERSION_MICRO=libecbufr_version_micro |
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
31 |
AC_SUBST(VERSION_MAJOR) |
32 |
AC_SUBST(VERSION_MINOR) |
|
33 |
AC_SUBST(VERSION_MICRO) |
|
34 |
||
35 |
dnl Shared library version information |
|
36 |
dnl
|
|
37 |
dnl Current = interface version (increment when change user interface to lib) |
|
38 |
dnl Revision = revision number (increment when change implementation, reset to 0 for new interface) |
|
39 |
dnl Age = number of previous interfaces this one is compatible with (i.e. is a superset of) |
|
40 |
dnl
|
|
41 |
dnl Suffix1 = [Current - Age] (on Linux, anyway, soname suffix is [C-A].A.R) |
|
42 |
dnl
|
|
79.1.3
by Michel Van Eeckhout
Adding internationalisation support. Still need library source code |
43 |
LIBTOOL_CURRENT=libecbufr_version_major |
44 |
LIBTOOL_REVISION=libecbufr_version_minor |
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
45 |
LIBTOOL_AGE=0 |
79.1.3
by Michel Van Eeckhout
Adding internationalisation support. Still need library source code |
46 |
LIBTOOL_SUFFIX1=libecbufr_version_major |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
47 |
LIBTOOL_SUFFIX=${LIBTOOL_SUFFIX1}.${LIBTOOL_AGE}.${LIBTOOL_REVISION} |
48 |
||
49 |
TOPDIR=`pwd` |
|
50 |
||
24.1.6
by Michel Van Eeckhout
Added --enable-code-coverage option, bug#516805 |
51 |
AC_ARG_ENABLE(code-coverage, [ --enable-code-coverage Adds -fprofile-arcs -ftest-coverage to CFLAGS to be able to use gcov], [ CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"]) |
52 |
||
129
by Vanh Souvanlasy
Add "--enable-cgi" to configure, to solve bug#602783 |
53 |
AC_ARG_ENABLE(cgi, [ --enable-cgi build and install cgi component [[default=no]]], [ |
54 |
if test "$enableval" = no; then
|
|
55 |
build_dir_cgi=""
|
|
56 |
else
|
|
57 |
build_dir_cgi="cgi"
|
|
58 |
fi
|
|
201
by Vanh Souvanlasy
Update release no as "rc2" |
59 |
|
60 |
if test "$CGI_PREFIX" = "" ; then
|
|
61 |
if test "$CGI_BINDIR" = "" ; then
|
|
62 |
CGI_BINDIR="/usr/lib/cgi-bin/libecbufr"
|
|
63 |
fi
|
|
64 |
if test "$CGI_DOCDIR" = "" ; then
|
|
65 |
CGI_DOCDIR="/usr/share/doc/libecbufr/cgi"
|
|
66 |
fi
|
|
67 |
if test "$CGI_HTMLDIR" = "" ; then
|
|
68 |
CGI_HTMLDIR="/var/www/libecbufr"
|
|
69 |
fi
|
|
70 |
if test "$CGI_EXDIR" = "" ; then
|
|
71 |
CGI_EXDIR="/var/www/libecbufr/ex"
|
|
72 |
fi
|
|
73 |
else
|
|
74 |
if test "$CGI_BINDIR" = "" ; then
|
|
75 |
CGI_BINDIR="$CGI_PREFIX/cgi-bin"
|
|
76 |
fi
|
|
77 |
if test "$CGI_DOCDIR" = "" ; then
|
|
78 |
CGI_DOCDIR="$CGI_PREFIX/doc"
|
|
79 |
fi
|
|
80 |
if test "$CGI_HTMLDIR" = "" ; then
|
|
81 |
CGI_HTMLDIR="$CGI_PREFIX"
|
|
82 |
fi
|
|
83 |
if test "$CGI_EXDIR" = "" ; then
|
|
84 |
CGI_EXDIR="$CGI_PREFIX/examples"
|
|
85 |
fi
|
|
86 |
fi
|
|
87 |
||
88 |
AC_ARG_VAR(CGI_PREFIX, cgi component install path, default is "")
|
|
89 |
AC_ARG_VAR(CGI_BINDIR, cgi component binary install path)
|
|
90 |
AC_ARG_VAR(CGI_DOCDIR, cgi component documentation install path)
|
|
91 |
AC_ARG_VAR(CGI_HTMLDIR, cgi component html install path)
|
|
92 |
AC_ARG_VAR(CGI_EXDIR, cgi component examples install path)
|
|
129
by Vanh Souvanlasy
Add "--enable-cgi" to configure, to solve bug#602783 |
93 |
],[build_dir_cgi=""]) |
94 |
||
201
by Vanh Souvanlasy
Update release no as "rc2" |
95 |
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
96 |
# on IRIX machines: use cc instead of gcc, use -c99 and remove -std=gnu99 |
97 |
# CFLAGS="$CFLAGS -c99 -I${PWD}/API/Headers -D_GNU_SOURCE" |
|
98 |
# For gcc |
|
99 |
# -D_REENTRANT : so that library compatible with Linux Threads |
|
100 |
# -fPIC : for shared library |
|
101 |
# should be stripped with : strip --strip-unneeded thelibrary |
|
102 |
# shared libraries should be installed in /usr/lib |
|
103 |
# otherwise, /etc/ld.so.conf should contains reference to that directory at post-install and |
|
104 |
# removed from at post-removal |
|
105 |
#
|
|
106 |
# no -fPIC : for static library |
|
107 |
#CFLAGS="$CFLAGS -I${PWD}/API/Headers -std=gnu99 -g -D_REENTRANT" |
|
83.1.9
by Vanh Souvanlasy
removed "-static" and change micro version to beta4 |
108 |
# add "-static" to have movable binaries |
201
by Vanh Souvanlasy
Update release no as "rc2" |
109 |
CFLAGS="$CFLAGS -I${PWD}/API/Headers -I${PWD}/API/Sources -std=gnu99 -D_REENTRANT -fPIC -g" |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
110 |
LDFLAGS="$LDFLAGS -L${PWD}/API/Sources" |
111 |
||
112 |
# Checks for programs. |
|
113 |
AC_PROG_CC
|
|
114 |
AC_PROG_INSTALL
|
|
115 |
AC_PROG_MAKE_SET
|
|
6
by Vanh Souvanlasy
Added "libtoolize --force" to recreate ltmain.sh for Bug#374191 |
116 |
#
|
79.1.3
by Michel Van Eeckhout
Adding internationalisation support. Still need library source code |
117 |
AC_GNU_SOURCE
|
118 |
||
6
by Vanh Souvanlasy
Added "libtoolize --force" to recreate ltmain.sh for Bug#374191 |
119 |
# AC_PROG_RANLIB is rendered obsolete by AC_PROG_LIBTOOL |
203
by Christophe Beauregard
we can't build at all on Linux without libtool. Might need some sort of |
120 |
#AC_PROG_RANLIB
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
121 |
# seems AC_PROG_LIBTOOL not available on IRIX, and should be commented |
203
by Christophe Beauregard
we can't build at all on Linux without libtool. Might need some sort of |
122 |
AC_PROG_LIBTOOL
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
123 |
|
124 |
AC_PATH_PROG(DOXYGEN, doxygen, no) |
|
113
by Christophe Beauregard
Add support for pkg-config to make building against LibECBUFR a lot easier. |
125 |
AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes) |
126 |
AM_CONDITIONAL(HAVE_PKGCONFIG, test "$HAVE_PKGCONFIG" = "yes") |
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
127 |
|
128 |
# Checks for libraries. |
|
24.1.15
by Michel Van Eeckhout
Modification to allow unit tests to run with 'make check' only if the |
129 |
#AM_PATH_CHECK("0.9.4") #this is apparently deprecated (message from configure) |
130 |
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], CHECK_AVAILABLE="yes", CHECK_AVAILABLE="no") |
|
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
131 |
|
132 |
# Checks for header files. |
|
133 |
#AC_HEADER_STDC
|
|
134 |
AC_CHECK_HEADERS(stdio.h stdlib.h string.h math.h limits.h sys/types.h time.h ctype.h) |
|
135 |
||
136 |
# Checks for typedefs, structures, and compiler characteristics. |
|
137 |
#AC_C_CONST
|
|
138 |
#AC_STRUCT_TM
|
|
139 |
||
140 |
# Check endianness |
|
141 |
AC_C_BIGENDIAN
|
|
142 |
||
143 |
#-------------------------------------------------------------------- |
|
144 |
# On a few very rare systems, all of the libm.a stuff is |
|
145 |
# already in libc.a. Set compiler flags accordingly. |
|
146 |
# Also, Linux requires the "ieee" library for math to work |
|
147 |
# right (and it must appear before "-lm"). |
|
148 |
#-------------------------------------------------------------------- |
|
149 |
MATH_LIBS="" |
|
150 |
AC_CHECK_FUNC(sin, , MATH_LIBS="-lm") |
|
151 |
AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) |
|
152 |
||
153 |
dnl Checks for precise integer types |
|
153
by Vanh Souvanlasy
check for values.h |
154 |
AC_CHECK_HEADERS([stdint.h inttypes.h sys/int_types.h values.h]) |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
155 |
AC_CHECK_TYPES([uint64_t, uint128_t]) |
156 |
||
157 |
||
158 |
# Checks for library functions. |
|
159 |
AC_CHECK_LIB( c, main ) |
|
160 |
#AC_FUNC_MALLOC
|
|
161 |
#AC_FUNC_REALLOC
|
|
162 |
#AC_CHECK_FUNCS([strdup]) |
|
163 |
||
164 |
dnl Set environment variables. |
|
165 |
# AC_SUBST(PACKAGE) |
|
166 |
# AC_SUBST(RELEASE) |
|
167 |
AC_SUBST(BUILD_DATE) |
|
129
by Vanh Souvanlasy
Add "--enable-cgi" to configure, to solve bug#602783 |
168 |
AC_SUBST(build_dir_cgi) |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
169 |
|
170 |
AM_MAINTAINER_MODE
|
|
171 |
||
79.1.3
by Michel Van Eeckhout
Adding internationalisation support. Still need library source code |
172 |
# Internationalization support |
173 |
AM_GNU_GETTEXT_VERSION([0.16.1]) |
|
174 |
AM_GNU_GETTEXT([external]) |
|
175 |
||
24.1.15
by Michel Van Eeckhout
Modification to allow unit tests to run with 'make check' only if the |
176 |
# Set a conditional value for the 'check' package. |
177 |
AM_CONDITIONAL(CHECK_ACTIVATED, test "$CHECK_AVAILABLE" = yes) |
|
178 |
||
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
179 |
AC_OUTPUT(Makefile \ |
79.1.3
by Michel Van Eeckhout
Adding internationalisation support. Still need library source code |
180 |
po/Makefile.in \ |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
181 |
API/Makefile \ |
182 |
API/Headers/Makefile \ |
|
183 |
API/Headers/private/Makefile \ |
|
184 |
API/Headers/bufr_api.h \ |
|
185 |
API/Sources/Makefile \ |
|
186 |
API/version \ |
|
187 |
Utilities/Makefile \ |
|
79.1.8
by Michel Van Eeckhout
Added internationalization and french translations for coder and decoder |
188 |
Utilities/po/Makefile.in \ |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
189 |
Tables/Makefile \ |
190 |
Test/Makefile \ |
|
79.1.18
by Michel Van Eeckhout
Internationalization of test files |
191 |
Test/po/Makefile.in \ |
1
by Vanh Souvanlasy
Initial import for public release 0.8.0 |
192 |
Docs/Makefile \ |
193 |
Test/BUFR/Makefile \ |
|
194 |
Test/Dump/Makefile \ |
|
24.1.2
by Michel Van Eeckhout
Adding Unit_Tests repository and unit test files |
195 |
Test/Unit_Tests/Makefile \ |
110
by Christophe Beauregard
Add LibECBUFR CGI script(s) used for the BUFR Workshop under cgi/... We might want to generate a separate |
196 |
Examples/Makefile |
197 |
cgi/Makefile |
|
198 |
) |