Refine the autotools configuration files.
authorTz-Huan Huang <tzhuan@gmail.com>
Wed, 10 Oct 2012 05:38:51 +0000 (13:38 +0800)
committerTz-Huan Huang <tzhuan@gmail.com>
Wed, 10 Oct 2012 05:38:51 +0000 (13:38 +0800)
bootstrap
configure.ac
src/Makefile.am

index cfabfaa9fd9167a9b4d1cba42f94e2bdf123a260..34d38b5853ee2e9f347f9d23ec09b549dd8b8295 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,36 +1,24 @@
 #! /bin/sh
-# bootstrap -- Use this script to create generated files from the CVS dist
-# Copyright (C) 2000 Gary V. Vaughan
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-## @start 1
-#! /bin/sh
 
 set -x
 
-autoreconf --force --install
-# intltoolize --force
-# autoreconf
+AM_VERSION=-1.11
+AC_VERSION=
+
+if [ "x${ACLOCAL_DIR}" != "x" ]; then
+  ACLOCAL_ARG=-I ${ACLOCAL_DIR}
+fi
+
+# ChangeLog is deprecated, but autotool expects one.
+touch ChangeLog
+
+AUTOMAKE=${AUTOMAKE:-automake$AM_VERSION} libtoolize -c --automake
+AUTOMAKE=${AUTOMAKE:-automake$AM_VERSION} intltoolize -c --automake
+${ACLOCAL:-aclocal$AM_VERSION} ${ACLOCAL_ARG}
+${AUTOHEADER:-autoheader$AC_VERSION}
+${AUTOMAKE:-automake$AM_VERSION} --add-missing --copy --include-deps
+${AUTOCONF:-autoconf$AC_VERSION}
 
-#aclocal -I m4
-#autoheader
-#libtoolize -c --automake 
-#automake --add-missing --copy --include-deps
-#autoconf
-#cd skim
-#./bootstrap
-#cd ..
-## @end 1
+if [ -d autom4te.cache ]; then
+    rm -rf autom4te.cache
+fi
index cd039dcc16a37b60f0b515bb7e7cda8ccd5596dc..04efd3a8cb0cf6efb49c08c07e981e8673e2abc8 100644 (file)
@@ -2,32 +2,31 @@
 AC_INIT(scim-tables, 0.5.11, suzhe@tsinghua.org.cn) #do not forget to edit skim/configure.in.in to change the version
 AC_CONFIG_SRCDIR([src/scim_table_imengine.h])
 
-SCIM_VERSION=1.4.9
-
-AC_SUBST(SCIM_VERSION)
-
-PACKAGE=scim-tables
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$PACKAGE", [The gettext domain])
-AC_SUBST(PACKAGE)
+AC_SUBST(PACKAGE_VERSION)
+AC_DEFINE_UNQUOTED(SCIM_TABLES_VERSION, "$PACKAGE_VERSION", [The release version of scim-tables.])
 
 # Init automake stuff
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER([config.h])
 
 # Init gettext
-ALL_LINGUAS="zh_CN zh_TW ja ko de fr it pa nl"
 AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION(0.14)
 
-# Check intltool
-# IT_PROG_INTLTOOL([0.33], [no-xml])
+GETTEXT_PACKAGE=scim-tables
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [The gettext domain])
+AM_GLIB_GNU_GETTEXT
 
-AC_LIBTOOL_WIN32_DLL
+# Init libtool
 AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
-AC_LIB_LTDL
+AC_LIB_LTDL
 AC_SUBST(LIBTOOL_DEPS)
 
+# Check intltool
+IT_PROG_INTLTOOL([0.33], [no-xml])
+
 AC_PROG_CXX
 AC_PROG_CC
 AC_LANG(C++)
@@ -36,6 +35,9 @@ AC_C_CONST
 AC_C_INLINE
 AC_TYPE_SIZE_T
 
+SCIM_VERSION=1.4.9
+AC_SUBST(SCIM_VERSION)
+
 # Check SCIM 
 PKG_CHECK_MODULES(SCIM,[scim >= $SCIM_VERSION])
 
@@ -55,12 +57,11 @@ AC_SUBST(SCIM_BUILD_SETUP)
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([langinfo.h libintl.h string.h hash_map ext/hash_map])
+AC_CHECK_HEADERS([langinfo.h libintl.h string.h hash_map ext/hash_map])
 
 # libtool option to control which symbols are exported
 # right now, symbols starting with _ are not exported
 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
-AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
 
 # Extra args.
 AC_ARG_ENABLE(debug,
@@ -238,7 +239,7 @@ AC_OUTPUT
 
 AC_MSG_RESULT([
 Build options:
-  Version                  $VERSION
+  Version                  $PACKAGE_VERSION
   Install prefix           $prefix
   Build shared libs        $enable_shared
   Build static libs        $enable_static
index a6c7f68f5cd68315f73d7cb7c40320e904aaa7d5..f47323f2b655e7e0b7d8bf19b868c494158f2760 100644 (file)
@@ -49,7 +49,7 @@ table_la_CXXFLAGS     = @SCIM_CFLAGS@
 table_la_LDFLAGS       = -avoid-version \
                          -rpath $(moduledir) \
                          -module \
-                         @LIBTOOL_EXPORT_OPTIONS@ \
+                         $(LIBTOOL_EXPORT_OPTIONS) \
                          @LTLIBINTL@ \
                          @SCIM_LIBS@ 
 
@@ -79,7 +79,7 @@ table_imengine_setup_la_CXXFLAGS= @SCIM_GTKUTILS_CFLAGS@ @SCIM_CFLAGS@
 table_imengine_setup_la_LDFLAGS        = -avoid-version \
                                 -rpath $(setupmoduledir) \
                                 -module \
-                                @LIBTOOL_EXPORT_OPTIONS@ \
+                                $(LIBTOOL_EXPORT_OPTIONS) \
                                 @LTLIBINTL@ \
                                 @SCIM_GTKUTILS_LIBS@ \
                                 @SCIM_LIBS@