]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
LibTrie refactro: remove sub-configure invocation
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 11 Jun 2013 13:13:23 +0000 (15:13 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 11 Jun 2013 13:13:23 +0000 (15:13 +0200)
20 files changed:
bootstrap.sh
configure.ac
lib/libTrie/Makefile.am
lib/libTrie/Trie.cc [moved from lib/libTrie/src/Trie.cc with 98% similarity]
lib/libTrie/Trie.cci [moved from lib/libTrie/include/Trie.cci with 100% similarity]
lib/libTrie/Trie.h [moved from lib/libTrie/include/Trie.h with 100% similarity]
lib/libTrie/TrieCharTransform.h [moved from lib/libTrie/include/TrieCharTransform.h with 100% similarity]
lib/libTrie/TrieNode.cc [moved from lib/libTrie/src/TrieNode.cc with 98% similarity]
lib/libTrie/TrieNode.cci [moved from lib/libTrie/include/TrieNode.cci with 100% similarity]
lib/libTrie/TrieNode.h [moved from lib/libTrie/include/TrieNode.h with 100% similarity]
lib/libTrie/acinclude.m4 [deleted file]
lib/libTrie/configure.ac [deleted file]
lib/libTrie/include/Makefile.am [deleted file]
lib/libTrie/src/Makefile.am [deleted file]
lib/libTrie/test/Makefile.am
lib/libTrie/test/trie.cc
scripts/source-maintenance.sh
src/Makefile.am
src/esi/CustomParser.cc
src/esi/VarState.h

index 8864dc6066194fbbd5bfa92e488a5349ef35ac56..3f14fdeb808481649f613a3b5bc77c478a4d1677 100755 (executable)
@@ -123,8 +123,7 @@ echo "libtool  ($ltversion) : ${LIBTOOL_BIN}${ltver}"
 echo "libtool path : $ltpath"
 
 for dir in \
-       "" \
-       lib/libTrie
+       "" 
 do
     if [ -z "$dir" ] || [ -d $dir ]; then
        if (
index 4f92468ee17f353de1da10c1b1200b6a29c2dd4a..614f6189fab0c22f12f5cb5e3234c622946f0395 100644 (file)
@@ -3373,6 +3373,8 @@ AC_CONFIG_FILES([\
        compat/Makefile \
        lib/Makefile \
        lib/ntlmauth/Makefile \
+       lib/libTrie/Makefile \
+       lib/libTrie/test/Makefile \
        lib/profiler/Makefile \
        lib/rfcnb/Makefile \
        lib/smblib/Makefile \
@@ -3461,7 +3463,7 @@ AC_CONFIG_FILES([\
        tools/purge/Makefile
 ])
 
-AC_CONFIG_SUBDIRS(lib/libTrie)
+dnl AC_CONFIG_SUBDIRS(lib/libTrie)
 
 # must configure libltdl subdir unconditionally for "make distcheck" to work
 #AC_CONFIG_SUBDIRS(libltdl)
index 0c35fc01415bc0ddb5a738ea3b760648fe6089f4..14bcd6a44ef7b1af1d16b03341abbff83de0b9dd 100644 (file)
@@ -1,5 +1,17 @@
-## Process this file with automake to produce Makefile.in
+include $(top_srcdir)/src/Common.am
+include $(top_srcdir)/src/TestHeaders.am
 
-AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5
-DIST_SUBDIRS = include src test
-SUBDIRS = src test
+DIST_SUBDIRS = test
+SUBDIRS = test
+
+noinst_LIBRARIES = libTrie.a
+
+noinst_HEADERS = Trie.h TrieNode.h TrieCharTransform.h
+
+libTrie_a_SOURCES = Trie.cc \
+       Trie.cci \
+       Trie.h \
+       TrieNode.cc \
+       TrieNode.cci \
+       TrieNode.h \
+       TrieCharTransform.h
similarity index 98%
rename from lib/libTrie/src/Trie.cc
rename to lib/libTrie/Trie.cc
index 557fcf0a7950716b6dbe3df7f6e141ec2f177ab1..f5e3f399d5071ff79c139713f9128709e7305005 100644 (file)
@@ -17,7 +17,7 @@
  *
  */
 
-#include "config.h"
+#include "squid.h"
 #include "Trie.h"
 #if HAVE_UNISTD_H
 #include <unistd.h>
similarity index 98%
rename from lib/libTrie/src/TrieNode.cc
rename to lib/libTrie/TrieNode.cc
index e81f62bb989e4a62e79366d39d45c73af5e72e96..60fbf54cf78885b3fc6beb8c4d4694ac135c45f0 100644 (file)
@@ -17,7 +17,7 @@
  *
  */
 
-#include "config.h"
+#include "squid.h"
 #include "TrieNode.h"
 #include "TrieCharTransform.h"
 #if HAVE_UNISTD_H
diff --git a/lib/libTrie/acinclude.m4 b/lib/libTrie/acinclude.m4
deleted file mode 100644 (file)
index ae7da3e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dnl
diff --git a/lib/libTrie/configure.ac b/lib/libTrie/configure.ac
deleted file mode 100644 (file)
index d69b402..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-# Process this file with autoconf to produce a configure script.
-AC_INIT(libTrie, 0.1, rbtcollins@squid-cache.org)
-AC_CONFIG_SRCDIR([src/Trie.cc])
-AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_AUX_DIR(cfgaux)
-
-enable_inline=${enable_inline:=yes}
-AC_ARG_ENABLE(optimizations,
-  AC_HELP_STRING([--disable-optimizations],
-                 [Do not compile Squid with compiler optimizations enabled.
-                  Optimization is good for production builds, but not
-                  good for debugging. During development, use
-                  --disable-optimizations to reduce compilation times
-                  and allow easier debugging. This option implicitly
-                  also enabled --disable-inline]), [
-  if test "x$enableval" = "xno" ; then
-        AC_MSG_NOTICE([Disabling compiler optimizations (-O flag)])
-        CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
-        CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-O[[0-9]]*//'`"
-        enable_inline="no"
-  fi
-])
-
-AC_ARG_ENABLE(inline,
-  AC_HELP_STRING([--disable-inline],
-                 [Do not compile trivial methods as inline. Squid
-                  is coded with much of the code able to be inlined.
-                  Inlining is good for production builds, but not
-                  good for development. During development, use
-                  --disable-inline to reduce compilation times and
-                  allow incremental builds to be quick. For
-                  production builds, or load tests, use
-                  --enable-inline to have squid make all trivial
-                  methods inlinable by the compiler.]), [
-  if test "x${enableval}" = "xno" ; then
-    enable_inline=no
-  fi
-])
-if test "x$enable_inline" = "xyes" ; then
-    AC_DEFINE(_SQUID_INLINE_, inline, 
-      [Keyword used by squid for inlining methods])
-    AC_DEFINE(_USE_INLINE_, 1, [Include inline methods into header file])
-else
-    AC_MSG_NOTICE([Inlining optimization disabled])
-    AC_DEFINE(_SQUID_INLINE_, [] , [Keyword used by squid for inlining methods])
-    AC_DEFINE(_USE_INLINE_, 0, [Include inline methods into header file])
-fi
-
-# Checks for programs.
-AC_PROG_CXX
-AC_PROG_CC
-AC_LANG_CPLUSPLUS
-AC_PROG_MAKE_SET
-# for old automakes - like squid-cache.orgs!
-AM_INIT_AUTOMAKE(libTrie, 0.1)
-AM_MAINTAINER_MODE
-AC_PROG_RANLIB
-
-AC_LIBTOOL_DLOPEN
-AC_LIBLTDL_CONVENIENCE
-AC_PROG_LIBTOOL
-AC_LTDL_DLLIB
-AC_SUBST(INCLTDL)
-AC_SUBST(LIBLTDL)
-
-dnl set useful flags
-TRIE_CFLAGS=
-TRIE_CXXFLAGS=
-if test "$GCC" = "yes"; then
-  TRIE_CFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -Wcomments"
-  TRIE_CXXFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wcomments"
-
-  AC_ARG_ENABLE(strict-error-checking,
-    AS_HELP_STRING([--disable-strict-error-checking],[By default compile
-                   with all possible static compiler error-checks enabled.
-                   This flag disables the behavior]), [
-    case $enableval in
-      yes|1|true)
-       enable_strict_error_checking=yes
-       ;;
-      *)
-       enable_strict_error_checking=no
-       ;;
-    esac
-  ])
-  AC_MSG_NOTICE([strict error checking enabled: ${enable_strict_error_checking:=yes}])
-  if test "x${enable_strict_error_checking:=yes}" = "xyes"; then
-     TRIE_CFLAGS="-Werror $TRIE_CFLAGS"
-     TRIE_CXXFLAGS="-Werror $TRIE_CXXFLAGS"
-  fi
-
-fi
-
-AC_SUBST(TRIE_CFLAGS)
-AC_SUBST(TRIE_CXXFLAGS)
-
-# Checks for libraries.
-
-# Checks for header files.
-AC_CHECK_HEADERS( \
-       iostream \
-)
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_SIZE_T
-
-# Checks for library functions.
-
-AC_CONFIG_FILES([Makefile
-                 include/Makefile
-                 src/Makefile
-                 test/Makefile])
-AC_OUTPUT
diff --git a/lib/libTrie/include/Makefile.am b/lib/libTrie/include/Makefile.am
deleted file mode 100644 (file)
index 395e2db..0000000
+++ /dev/null
@@ -1 +0,0 @@
-noinst_HEADERS = Trie.h TrieNode.h TrieCharTransform.h
diff --git a/lib/libTrie/src/Makefile.am b/lib/libTrie/src/Makefile.am
deleted file mode 100644 (file)
index 34a02a8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-
-INCLUDES = -I$(top_srcdir)/include
-
-AM_CFLAGS = $(TRIE_CFLAGS)
-AM_CXXFLAGS = $(TRIE_CXXFLAGS)
-
-noinst_LIBRARIES = libTrie.a
-
-libTrie_a_SOURCES = Trie.cc \
-       TrieNode.cc
-
-noinst_HEADERS = ../include/Trie.cci \
-       ../include/TrieNode.cci
index ee9350e574d3e32e116f32a4532038fac981114e..df33eba011d2b48b0c0e16e1a8d3b6490cc44682 100644 (file)
@@ -1,16 +1,15 @@
-INCLUDES = -I$(top_srcdir)/include
+include $(top_srcdir)/src/Common.am
 
-AM_CFLAGS = $(TRIE_CFLAGS)
-AM_CXXFLAGS = $(TRIE_CXXFLAGS)
+INCLUDES += -I$(top_srcdir)/include
 
 # TESTS = trie trie-c
-TESTS = trie
+TESTS += trie
 
 # check_PROGRAMS = trie trie-c
-check_PROGRAMS = trie
+check_PROGRAMS += trie
 
 trie_SOURCES = trie.cc
-trie_LDADD = $(top_builddir)/src/libTrie.a
+trie_LDADD = $(top_builddir)/lib/libTrie/libTrie.a
 
 #trie_c_SOURCES = trie-c.c
-#trie_c_LDADD = $(top_builddir)/src/libTrie.a -lm
+#trie_c_LDADD = $(top_builddir)/lib/libTrie/libTrie.a -lm
index 9f8a2b3ae10a9d5349116e8fd89e499abbb9438e..8404ff409eae413f4b44e468a802974176e29d17 100644 (file)
@@ -17,9 +17,9 @@
  *
  */
 
-#include "config.h"
-#include "Trie.h"
-#include "TrieCharTransform.h"
+#include "squid.h"
+#include "libTrie/Trie.h"
+#include "libTrie/TrieCharTransform.h"
 
 #if HAVE_IOSTREAM
 #include <iostream>
index 6a4a003de9ce4a15caae8015b229231dceafb382..4004476265a894cbd4e5097851a9b7f80e91bcb2 100755 (executable)
@@ -120,7 +120,7 @@ for FILENAME in `ls -1`; do
 
     esac
 
-    if test "$FILENAME" = "libltdl" -o "$FILENAME" = "libTrie" ; then
+    if test "$FILENAME" = "libltdl" ; then
         :
     elif test -d $FILENAME ; then
        cd $FILENAME
index 7e6b392df8f32ce85ff2e6604a27f44dc24ad5ca..cfe2846d0bddadc209b66e9ca82e2918016ba2f3 100644 (file)
@@ -80,7 +80,7 @@ if USE_ESI
 SUBDIRS += esi
 ESI_LOCAL_LIBS = \
        esi/libesi.la \
-       $(top_builddir)/lib/libTrie/src/libTrie.a
+       $(top_builddir)/lib/libTrie/libTrie.a
 ESI_LIBS = $(ESI_LOCAL_LIBS) \
        $(XMLLIB) \
        $(EXPATLIB)
index 4f1cc56fee016a4823995a051f64148181a5064b..effb2a646507eafe89778fc7b0e0aa7dadd366fb 100644 (file)
@@ -35,8 +35,8 @@
 #include "base/Vector.h"
 #include "esi/CustomParser.h"
 #include "Debug.h"
-#include "Trie.h"
-#include "TrieCharTransform.h"
+#include "libTrie/Trie.h"
+#include "libTrie/TrieCharTransform.h"
 
 Trie *ESICustomParser::SearchTrie=NULL;
 
index 5c632bcdced0334ac441e3753da6e7a4f5220361..0a538fb49466a1a975ebb3e7b60958fb2cfb7ea2 100644 (file)
@@ -33,7 +33,7 @@
 #define SQUID_ESIVARSTATE_H
 
 #include "esi/Segment.h"
-#include "Trie.h"
+#include "libTrie/Trie.h"
 #include "base/Vector.h"
 #include "HttpHeader.h"