[pisa-src] Re: the future of (internal) libconfig

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 26 Aug 2009 13:40:37 +0200

On Fri, Aug 21, 2009 at 05:15:40PM +0200, Diego Biurrun wrote:
> I'm working on getting rid of our internal copy of libconfig.  Compiling
> against current external versions of libconfig works fine.  libconfig8
> packages are already available on morpheus and will arrive on our
> workstations in short order.
> 
> The internal libconfig is quite a bit of code and compilation time.
> Dropping it should save us time and maintenance burden.  Of course,
> there may be issues that I have overlooked.
> 
> Are there any reasons to keep the internal copy of libconfig?

Here is the patch that removes libconfig without the 'svn rm' of the
libpisa directory.  I'd appreciate a second pair of eyes on the auto*
stuff.

Diego
Index: test/packaging/pisa-rpm.spec
===================================================================
--- test/packaging/pisa-rpm.spec        (revision 869)
+++ test/packaging/pisa-rpm.spec        (working copy)
@@ -140,9 +140,6 @@
 %{_libdir}/libpisa*
 %doc docs/INSTALL
 
-#%files libconfig6
-#%{_libdir}/libconfig6*
-
 %files mobile-guest
 /usr/sbin/pisacd
 %config /etc/init.d/pisacd
Index: test/packaging/pisa-deb.spec
===================================================================
--- test/packaging/pisa-deb.spec        (revision 869)
+++ test/packaging/pisa-deb.spec        (working copy)
@@ -20,7 +20,6 @@
 
 %build
 %configure --prefix=/usr
-# --with-included-libconfig
 make all
 
 %package all
@@ -108,9 +107,6 @@
 %{_libdir}/libpisa*
 %doc docs/INSTALL
 
-#%files libconfig6
-#%{_libdir}/libconfig6*
-
 %files mobile-guest
 /usr/sbin/pisacd
 %config /etc/init.d/pisacd
Index: test/Makefile.am
===================================================================
--- test/Makefile.am    (revision 869)
+++ test/Makefile.am    (working copy)
@@ -56,11 +56,6 @@
 endif
 endif
 
-if INCLUDED_LIBCONFIG
-INCLUDES += -I@LIBCONFIG_INCLUDES@
-LDFLAGS += -L@LIBCONFIG_INCLUDES@
-endif
-
 checkhipd_SOURCES  = checkhipd.c
 getns_SOURCES      = getns.c
 ifaddr_SOURCES     = ifaddr.c
Index: LICENSE
===================================================================
--- LICENSE     (revision 869)
+++ LICENSE     (working copy)
@@ -13,7 +13,3 @@
 libpisa/iwlib.c
 include/iwlib.h
 include/wireless.h
-
-
-LGPL version 2.1 or later:
-libpisa/libconfig-1.3.2/*
Index: libpisa/Makefile.am
===================================================================
--- libpisa/Makefile.am (revision 869)
+++ libpisa/Makefile.am (working copy)
@@ -18,10 +18,3 @@
 
 INCLUDES = -I$(PISA_COMMON_INCLUDES) -I$(PISA_LIBPISA_INCLUDES)
 CFLAGS = -Wall -g
-
-if INCLUDED_LIBCONFIG
-INCLUDES += -I$(LIBCONFIG_INCLUDES)
-SUBDIRS = libconfig-1.3.2
-endif
-
-DIST_SUBDIRS = libconfig-1.3.2
Index: pairing/Makefile.am
===================================================================
--- pairing/Makefile.am (revision 869)
+++ pairing/Makefile.am (working copy)
@@ -8,7 +8,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-CFLAGS = -Wall -g -I$(top_srcdir)/libpisa/libconfig-1.3.2      # add -pedantic 
if you want it to worry about your commenting style (and other stuff)
+CFLAGS = -Wall -g      # add -pedantic if you want it to worry about your 
commenting style (and other stuff)
 send_CFLAGS = -DSEND
 accept_CFLAGS = -DACCEPT
 bin_PROGRAMS = send accept passgen management
@@ -32,7 +32,6 @@
 
 if PISA_FORCE_SHLIB
   LDADD += -lpisa -lconfig
-  LDFLAGS += -L$(top_srcdir)/libpisa -L$(top_srcdir)/libpisa/libconfig-1.3.2
 else
 if PISA_FORCE_SHLIBCONFIG
   LDADD += @PISA_LIBPISA_LIB_STATIC@ -lconfig
@@ -41,10 +40,6 @@
 endif
 endif
 
-if INCLUDED_LIBCONFIG
-INCLUDES += -I@LIBCONFIG_INCLUDES@
-endif
-
 send_SOURCES = send.c common_headers.c common.c packet_handler.c hash.c 
libconfig_wrapper.c packet_handler_send.c create_send_headers.c
 accept_SOURCES = accept.c hash.c common_headers.c packet_handler.c 
libconfig_wrapper.c common.c packet_handler_accept.c create_accept_headers.c
 passgen_SOURCES = passgen.c hash.c
Index: configure.ac
===================================================================
--- configure.ac        (revision 869)
+++ configure.ac        (working copy)
@@ -35,7 +35,6 @@
 AC_CHECK_LIB(m, pow, AC_DEFINE(HAVE_LIBM_POW, 1,
        [Define if you have pow function in libm.]), )
 AC_CHECK_LIB([crypto], DSA_generate_key,, AC_MSG_ERROR(openssl lib not found))
-AC_CHECK_LIB([config], [config_setting_index], ac_cv_included_libconfig=no, 
ac_cv_included_libconfig=yes)
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -95,32 +94,6 @@
             [ac_cv_hipl_dir=""]
 )
 
-AC_ARG_ENABLE(included-libconfig,
-            AC_HELP_STRING([--enable-included-libconfig],
-                           [Link to the included libconfig (default=yes)]),
-            [ac_cv_included_libconfig=$enableval],
-            [ac_cv_included_libconfig=yes]
-)
-AC_CACHE_CHECK([whether to use included libconfig],
-               [ac_cv_included_libconfig], [ac_cv_included_libconfig=no])
-
-if test x"$ac_cv_included_libconfig" = x"yes"; then
-        AC_DEFINE(CONFIG_INCLUDED_LIBCONFIG, AC_PREREQ(2.53))
-        AH_TEMPLATE(CONFIG_INCLUDED_LIBCONFIG)
-        AC_ARG_ENABLE(cxx,
-                      AC_HELP_STRING([--enable-libconfig-cxx],
-                      [enable building of the libconfig C++ library 
(default=no)]),
-                      [docxx=yes],
-                      [docxx=no]
-        )
-        AC_CACHE_CHECK([whether to enable the libconfig C++ library],
-                       [docxx], [docxx=no])
-
-        AM_CONDITIONAL(BUILDCXX, test x$docxx = xyes)
-fi
-
-AM_CONDITIONAL(INCLUDED_LIBCONFIG, test x"$ac_cv_included_libconfig" = x"yes")
-
 AC_ARG_ENABLE(force-shlib,
              AC_HELP_STRING([--enable-force-shlib],
                             [force linking to shared libraries (default=no)]),
@@ -136,14 +109,12 @@
 # If the system-wide libconfig is to be used, e.g. /usr/lib/libconfig.{a,so},
 # and at the same time its static library libconfig.a does not exist, then
 # you have to link binaries with libconfig.so, setting PISA_FORCE_SHLIB as yes.
-if test x"$ac_cv_included_libconfig" = x"no"; then
        if test ! -f "$ac_default_prefix/lib/libconfig.a"; then
                AC_MSG_WARN("$ac_default_prefix/lib/libconfig.a does not exist! 
Being forced to link to shared library libconfig.so...")
                ac_cv_use_force_shlibconfig=yes
                AC_DEFINE(CONFIG_PISA_FORCE_SHLIBCONFIG, AC_PREREQ(2.53))
                AH_TEMPLATE(CONFIG_PISA_FORCE_SHLIBCONFIG)
        fi
-fi
 AM_CONDITIONAL(PISA_FORCE_SHLIBCONFIG, test x"$ac_cv_use_force_shlibconfig" = 
x"yes")
 
 AC_ARG_ENABLE(openwrt,
@@ -200,17 +171,10 @@
 AC_SUBST(PISA_LIBPISA_LIB_STATIC, "$PISA_LIBPISA_LIB/libpisa.a")
 AC_SUBST(PISA_LIBPISA_LIB_DYNAMIC, "$PISA_LIBPISA_LIB/libpisa.so")
 
-if test x"$ac_cv_included_libconfig" = x"yes"; then
-AC_SUBST(PISA_LIBCONFIG, "$TOPSRC/libpisa/libconfig-1.3.2")
-AC_SUBST(PISA_LIBCONFIG_LIB, "$PISA_LIBCONFIG/.libs")
-AC_SUBST(PISA_LIBCONFIG_LIB_STATIC, "$PISA_LIBCONFIG_LIB/libconfig.a")
-AC_SUBST(PISA_LIBCONFIG_LIB_DYNAMIC, "$PISA_LIBCONFIG_LIB/libconfig.so")
-else
 AC_SUBST(PISA_LIBCONFIG, "/usr/lib")
 AC_SUBST(PISA_LIBCONFIG_LIB, "$PISA_LIBCONFIG")
 AC_SUBST(PISA_LIBCONFIG_LIB_STATIC, "$PISA_LIBCONFIG_LIB/libconfig.a")
 AC_SUBST(PISA_LIBCONFIG_LIB_DYNAMIC, "$PISA_LIBCONFIG_LIB/libconfig.so")
-fi
 
 AC_SUBST(PISA_PISACD, "$TOPSRC/client/pisacd")
 AC_SUBST(PISA_PISACD_INCLUDES, "$PISA_PISACD")
@@ -225,9 +189,6 @@
 AC_SUBST(PISA_PERFORMANCE_LIB_STATIC, "$PISA_PERFORMANCE_LIB/libperformance.a")
 AC_SUBST(PISA_PERFORMANCE_LIB_DYNAMIC, 
"$PISA_PERFORMANCE_LIB/libperformance.so")
 
-AC_SUBST(LIBCONFIG_INCLUDES, "$PISA_LIBPISA_INCLUDES/libconfig-1.3.2")
-AC_CONFIG_FILES([libpisa/libconfig-1.3.2/Makefile])
-
 AC_CONFIG_FILES([
                 include/Makefile
                 libpisa/Makefile
@@ -240,8 +201,4 @@
                 performance/Makefile
                 Makefile])
 
-if test x"$ac_cv_included_libconfig" = x"yes"; then
-       AC_CONFIG_SUBDIRS([libpisa/libconfig-1.3.2])
-fi
-
 AC_OUTPUT
Index: trust-point/pisasd/Makefile.am
===================================================================
--- trust-point/pisasd/Makefile.am      (revision 869)
+++ trust-point/pisasd/Makefile.am      (working copy)
@@ -36,11 +36,6 @@
   LDADD += @PISA_PERFORMANCE_LIB_STATIC@
 endif
 
-if INCLUDED_LIBCONFIG
-INCLUDES += -I@LIBCONFIG_INCLUDES@
-LDFLAGS += -L@LIBCONFIG_INCLUDES@
-endif
-
 LDADD += -lm
 pisasd_SOURCES = sdmain.c sdclients.c sdconf.c sdctx.c sdmsg.c sdtun.c 
pisasdconf.c
 pisasdconf_SOURCES = pisaconftool.c pisasdconf.c
Index: autogen.sh
===================================================================
--- autogen.sh  (revision 869)
+++ autogen.sh  (working copy)
@@ -5,7 +5,6 @@
 fi
 
 autoreconf --install --force -I m4 && \
-  (cd libpisa/libconfig-1.3.2; ./configure --disable-cxx) && \
   echo "Preparing was successful if there was no error messages above." && \
   echo "Now type:" && \
   echo "  ./configure && make"  && \
Index: community-operator/Makefile.am
===================================================================
--- community-operator/Makefile.am      (revision 869)
+++ community-operator/Makefile.am      (working copy)
@@ -5,7 +5,7 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-INCLUDES = -I$(top_srcdir)/libpisa/libconfig-1.3.2 -I$(top_srcdir)/include
+INCLUDES = -I$(top_srcdir)/include
 
 bin_PROGRAMS = co_server co_client
 
@@ -22,11 +22,6 @@
   LDADD += @PISA_LIBPISA_LIB_STATIC@ @PISA_LIBCONFIG_LIB_STATIC@
 endif
 
-if INCLUDED_LIBCONFIG
-INCLUDES += -I@LIBCONFIG_INCLUDES@
-LDFLAGS += -L@LIBCONFIG_INCLUDES@
-endif
-
 if PISA_WITH_HIPL
 # Things needed for compiling hipl-related codes
 INCLUDES += -I@PISA_HIPL_SRCDIR@/libinet6/include
Index: guest-access-point/openwrt/trunk/packages/pisa/Makefile
===================================================================
--- guest-access-point/openwrt/trunk/packages/pisa/Makefile     (revision 869)
+++ guest-access-point/openwrt/trunk/packages/pisa/Makefile     (working copy)
@@ -35,7 +35,6 @@
                -I$(STAGING_DIR)/include \
                -I$(TOOLCHAIN_DIR)/include \
                -I$(PKG_BUILD_DIR)/include \
-               -I$(PKG_BUILD_DIR)/libpisa/libconfig-1.3.2/" \
        LDFLAGS="$$$$LDFLAGS \
                -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib \
                -L$(TOOLCHAIN_DIR)/lib" \
@@ -52,7 +51,6 @@
                --enable-openwrt \
                --enable-performance=false \
                --enable-preauth \
-               --enable-included-libconfig=false \
        );
 endef
 
Index: guest-access-point/openwrt/8.09rc1/packages/pisa/Makefile
===================================================================
--- guest-access-point/openwrt/8.09rc1/packages/pisa/Makefile   (revision 869)
+++ guest-access-point/openwrt/8.09rc1/packages/pisa/Makefile   (working copy)
@@ -35,7 +35,6 @@
                -I$(STAGING_DIR)/include \
                -I$(TOOLCHAIN_DIR)/include \
                -I$(PKG_BUILD_DIR)/include \
-               -I$(PKG_BUILD_DIR)/libpisa/libconfig-1.3.2/" \
        LDFLAGS="$$$$LDFLAGS \
                -L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib \
                -L$(TOOLCHAIN_DIR)/lib" \
@@ -52,7 +51,6 @@
                --enable-openwrt \
                --enable-performance=false \
                --enable-preauth \
-               --enable-included-libconfig=false \
        );
 endef
 
Index: guest-access-point/pisand/Makefile.am
===================================================================
--- guest-access-point/pisand/Makefile.am       (revision 869)
+++ guest-access-point/pisand/Makefile.am       (working copy)
@@ -34,10 +34,5 @@
   LDADD += @PISA_PERFORMANCE_LIB_STATIC@
 endif
 
-if INCLUDED_LIBCONFIG
-INCLUDES += -I@LIBCONFIG_INCLUDES@
-LDFLAGS += -L@LIBCONFIG_INCLUDES@
-endif
-
 pisand_SOURCES = ndmain.c ndconf.c ndconmgr.c ndctx.c ndmsg.c neighbor.c
 include_HEADERS = ndconf.h ndconmgr.h ndctx.h ndmsg.h neighbor.h
Index: client/pisacd/Makefile.am
===================================================================
--- client/pisacd/Makefile.am   (revision 869)
+++ client/pisacd/Makefile.am   (working copy)
@@ -35,11 +35,6 @@
   LDADD += @PISA_PERFORMANCE_LIB_STATIC@
 endif
 
-if INCLUDED_LIBCONFIG
-INCLUDES += -I@LIBCONFIG_INCLUDES@
-LDFLAGS += -L@LIBCONFIG_INCLUDES@
-endif
-
 LDADD += -lm
 pisacd_SOURCES = cdmain.c cdconf.c cdconmgr.c cdctx.c cdmsg.c cdpending.c \
                 cdservers.c cdtun.c pisacdconf.c cdconfhandlers.c

Other related posts: