Update autoconf/automake standards

Generated files config.guess config.sub depcomp install-sh ltmain.sh missing
and ylwrap have been moved to build-aux/

Ran autoupdate

Replaced AC_TRY_LINK/AC_TRY_COMPILE by AC_LINK_IFELSE/AC_COMPILE_IFELSE

Droped -I$(top_srcdir)/include from CFLAGS since AC_CONFIG_HEADERS already
adds the -I

Fixed bison detection

Added AM_PROG_AR as required by autoreconf -i -Wall

Updated NEWS and .gitignore
This commit is contained in:
Nirgal Vourgère 2013-07-09 18:39:03 +02:00
parent a021708dae
commit 088493d499
10 changed files with 43 additions and 39 deletions

8
.gitignore vendored
View File

@ -5,12 +5,10 @@
.libs/
aclocal.m4
autom4te.cache/
config.guess
build-aux/
config.log
config.status
config.sub
configure
depcomp
dumptypes.c
dumptypes.h
Makefile.in
@ -20,15 +18,11 @@ include/config.h
include/config.h.in
include/mdbver.h
include/stamp-h1
install-sh
libmdb.pc
libmdbsql.pc
libtool
ltmain.sh
mdbtools.spec
missing
types.h
ylwrap
src/extras/mdb-hexdump
src/gmdb2/gmdb2
src/gmdb2/help/C/omf_timestamp

10
NEWS
View File

@ -1,6 +1,14 @@
Version 0.7.1
=============
An experimental version of ODBC driver is now available: libmdbodbcW.so
An experimental (buggy) version of ODBC driver that supports UCS-2 interface
is now available: libmdbodbcW.so
Note that libmdbodbc supports UTF-8 really well, so that this is usually not
needed.
autoconf/automake has been updates to more recent standards.
- config.guess config.sub depcomp install-sh ltmain.sh missing ylwrap
files are now in build-aux/ directory
You'll now need autoconf >= 2.58
Version 0.3
===========

View File

@ -43,15 +43,15 @@ AC_DEFUN([VL_LIB_READLINE], [
AC_SUBST(LIBREADLINE)
])dnl
dnl From Bruno Haible.
dnl From Bruno Haible.
AC_DEFUN([AM_ICONV],
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
AC_ARG_WITH([libiconv-prefix],
AC_HELP_STRING([--with-libiconv-prefix=DIR], [search for libiconv in DIR/include and DIR/lib]), [
AS_HELP_STRING([--with-libiconv-prefix=DIR], [search for libiconv in DIR/include and DIR/lib]), [
for dir in `echo "$withval" | tr : ' '`; do
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
@ -61,22 +61,22 @@ AC_HELP_STRING([--with-libiconv-prefix=DIR], [search for libiconv in DIR/include
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
iconv_close(cd);])],
am_cv_func_iconv=yes)
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS -liconv"
AC_TRY_LINK([#include <stdlib.h>
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
am_cv_lib_iconv=yes
am_cv_func_iconv=yes)
iconv_close(cd);])],
[am_cv_lib_iconv=yes
am_cv_func_iconv=yes])
LIBS="$am_save_LIBS"
fi
])
@ -84,7 +84,7 @@ AC_HELP_STRING([--with-libiconv-prefix=DIR], [search for libiconv in DIR/include
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL(am_cv_proto_iconv, [
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <stdlib.h>
#include <iconv.h>
extern
@ -96,8 +96,8 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
#else
size_t iconv();
#endif
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
], [])], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([$]{ac_t:-
}[$]am_cv_proto_iconv)
@ -111,15 +111,16 @@ size_t iconv();
AC_SUBST(LIBICONV)
])
dnl Check whether the target supports symbol aliases.
dnl Code copied from libgomp
AC_DEFUN([AM_GCC_ATTRIBUTE_ALIAS], [
AC_CACHE_CHECK([whether the target supports symbol aliases],
am_cv_gcc_have_attribute_alias, [
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([
void foo(void) { }
extern void bar(void) __attribute__((alias("foo")));],
[bar();], am_cv_gcc_have_attribute_alias=yes, am_cv_gcc_have_attribute_alias=no)])
[bar();])], am_cv_gcc_have_attribute_alias=yes, am_cv_gcc_have_attribute_alias=no)])
if test $am_cv_gcc_have_attribute_alias = yes; then
AC_DEFINE(HAVE_ATTRIBUTE_ALIAS, 1,
[Define to 1 if the target supports __attribute__((alias(...))).])

View File

@ -1,5 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(mdbtools, 0.7, [mdbtools-dev@lists.sourceforge.net])
AC_INIT([mdbtools],[0.7],[mdbtools-dev@lists.sourceforge.net])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_SRCDIR(src/extras/mdb-dump.c)
AM_INIT_AUTOMAKE
@ -11,8 +12,9 @@ AC_CONFIG_HEADERS(include/config.h)
AC_PROG_CC(gcc)
dnl Checks for programs.
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AM_PROG_LEX
AM_PROG_AR
LT_INIT
AC_PROG_LEX
AC_PROG_YACC
dnl Checks for header files.
@ -53,7 +55,7 @@ AC_MSG_RESULT( no - SQL engine disable);
sql=false
fi
if ! which $YACC > /dev/null; then
if ! $YACC -V >/dev/null 2>&1; then
sql=false
fi
@ -72,8 +74,7 @@ CFLAGS="$CFLAGS -Wall"
dnl Enable -Wl,--as-needed by default to prevent overlinking
AC_ARG_ENABLE([as-needed],
AC_HELP_STRING([--disable-as-needed],
[Disable overlinking protection]),
AS_HELP_STRING([--disable-as-needed],[Disable overlinking protection]),
[enable_as_needed=$enableval], [enable_as_needed=yes])
if test "x$enable_as_needed" != "xno"; then
@ -151,7 +152,7 @@ It can be downloaded at www.gtk.org.
PKG_CHECK_MODULES(GNOME,gtk+-2.0 >= 2.14 libglade-2.0 libgnomeui-2.0, HAVE_GNOME=true, HAVE_GNOME=false)
AC_ARG_ENABLE(gmdb2,
AC_HELP_STRING([--disable-gmdb2], [do not build gmdb2]),
AS_HELP_STRING([--disable-gmdb2],[do not build gmdb2]),
[build_gmdb2=$enableval], [build_gmdb2=yes])
if test "$build_gmdb2" = "yes" ; then
@ -228,7 +229,7 @@ VL_LIB_READLINE
localedir=${datadir}/locale
AC_SUBST(localedir)
AC_OUTPUT([
AC_CONFIG_FILES([
libmdb.pc
libmdbsql.pc
src/util/Makefile
@ -245,4 +246,5 @@ src/gmdb2/help/Makefile
src/gmdb2/help/C/Makefile
mdbtools.spec
include/mdbver.h])
AC_OUTPUT
dnl doc/reference/libmdb/Makefile])

View File

@ -1,6 +1,6 @@
bin_PROGRAMS = mdb-hexdump
mdb_hexdump_SOURCES = mdb-dump.c mdbsupport.c
EXTRA_DIST = mdbsupport.h
AM_CPPFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS)
AM_CFLAGS = $(GLIB_CFLAGS)
LDADD = ../libmdb/libmdb.la
LIBS = $(GLIB_LIBS)

View File

@ -4,8 +4,7 @@ include_HEADERS = gmdb.h
gmdb2_SOURCES = main2.c file.c table.c info.c table_def.c table_data.c table_export.c debug.c sql.c schema.c prefs.c
LIBS = -rdynamic $(GNOME_LIBS) @LIBS@ @LEXLIB@
AM_CPPFLAGS = -I$(top_srcdir)/include \
$(GNOME_CFLAGS) \
AM_CFLAGS = $(GNOME_CFLAGS) \
-DDATADIR="\"$(datadir)\"" \
-DGMDB_ICONDIR="\"$(datadir)/gmdb/glade/\"" \
-DGMDB_GLADEDIR="\"$(datadir)/gmdb/glade/\""

View File

@ -1,5 +1,5 @@
lib_LTLIBRARIES = libmdb.la
libmdb_la_SOURCES= catalog.c mem.c file.c table.c data.c dump.c backend.c money.c sargs.c index.c like.c write.c stats.c map.c props.c worktable.c options.c iconv.c
libmdb_la_LDFLAGS = -version-info 2:1:0 -export-symbols-regex '^(mdb_|_mdb_put_int16$$|_mdb_put_int32$$)'
AM_CPPFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS)
LIBS = $(GLIB_LIBS) @LIBS@
AM_CFLAGS = $(GLIB_CFLAGS)
LIBS = $(GLIB_LIBS) @LIBS@ @LIBICONV@

View File

@ -1,15 +1,15 @@
noinst_PROGRAMS = unittest
lib_LTLIBRARIES = libmdbodbc.la
AM_CPPFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS) $(ODBC_CFLAGS)
AM_CFLAGS = $(GLIB_CFLAGS) $(ODBC_CFLAGS)
libmdbodbc_la_SOURCES = odbc.c connectparams.c mdbodbc.h connectparams.h
libmdbodbc_la_LIBADD = ../libmdb/libmdb.la ../sql/libmdbsql.la
libmdbodbc_la_LDFLAGS = -avoid-version -export-symbols-regex '^(SQL|ODBCINST)'
if ICONV
lib_LTLIBRARIES += libmdbodbcW.la
libmdbodbcW_la_SOURCES = $(libmdbodbc_la_SOURCES)
libmdbodbcW_la_LIBADD = $(libmdbodbc_la_LIBADD)
libmdbodbcW_la_LIBADD = $(libmdbodbc_la_LIBADD) @LIBICONV@
libmdbodbcW_la_LDFLAGS = $(libmdbodbc_la_LDFLAGS)
libmdbodbcW_la_CFLAGS = -D ENABLE_ODBC_W=1
libmdbodbcW_la_CFLAGS = $(AM_CFLAGS) -D ENABLE_ODBC_W=1
endif
LIBS = @LEXLIB@ $(GLIB_LIBS) $(ODBC_LIBS)
unittest_LDADD = libmdbodbc.la ../libmdb/libmdb.la ../sql/libmdbsql.la

View File

@ -2,7 +2,7 @@ lib_LTLIBRARIES = libmdbsql.la
libmdbsql_la_SOURCES= mdbsql.c parser.y lexer.l
libmdbsql_la_LDFLAGS = -version-info 2:0:0 -export-symbols-regex '^mdb_sql_'
CLEANFILES = parser.c parser.h lexer.c
AM_CPPFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS)
AM_CFLAGS = $(GLIB_CFLAGS)
LIBS = $(GLIB_LIBS)
libmdbsql_la_LIBADD = ../libmdb/libmdb.la
YACC = @YACC@ -d

View File

@ -2,7 +2,7 @@ bin_PROGRAMS = mdb-export mdb-array mdb-schema mdb-tables mdb-parsecsv mdb-heade
noinst_PROGRAMS = mdb-import prtable prcat prdata prkkd prdump prole updrow prindex
LIBS = $(GLIB_LIBS) @LIBS@ @LEXLIB@
DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\"
AM_CPPFLAGS = -I$(top_srcdir)/include $(GLIB_CFLAGS)
AM_CFLAGS = $(GLIB_CFLAGS)
LDADD = ../libmdb/libmdb.la
if SQL
mdb_sql_LDADD = ../libmdb/libmdb.la ../sql/libmdbsql.la $(LIBREADLINE)