summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-05-21 09:03:01 -0400
committerSimo Sorce <ssorce@redhat.com>2009-05-26 09:10:45 -0400
commit419d4579bcb84a3b10d8b5048df2087a3f55544f (patch)
treee36310049957f423bc9afa0d9ec7a1f056ac3274
parent23cb08ee2f1e3b597742281e475350039247d9d8 (diff)
downloadsssd-419d4579bcb84a3b10d8b5048df2087a3f55544f.tar.gz
sssd-419d4579bcb84a3b10d8b5048df2087a3f55544f.tar.bz2
sssd-419d4579bcb84a3b10d8b5048df2087a3f55544f.zip
Clean up automake build to work on older versions of libtool
LT_INIT is supported only on Libtool >= 2.0, so I reverted it to using AC_PROG_LIBTOOL. Also reorganized how the common libraries were being built. Now they are treated as libtool convenience libraries instead of installable libraries (the --with-singlelib configure flag can still be used to generate a combined, installable DSO) I cleaned up the set of files being installed by automake, so the list of things we need to remove before packaging the RPM is now only the .la files associated with our own plugins.
-rw-r--r--.gitignore7
-rw-r--r--common/Makefile.am14
-rw-r--r--common/collection/Makefile.am10
-rw-r--r--common/collection/configure.ac5
-rw-r--r--common/dhash/Makefile.am11
-rw-r--r--common/ini/Makefile.am9
-rw-r--r--common/ini/configure.ac2
-rw-r--r--common/trace/Makefile.am2
-rw-r--r--server/Makefile.am1
-rw-r--r--server/configure.ac3
-rw-r--r--sss_client/Makefile.am1
-rw-r--r--sss_client/configure.ac3
-rw-r--r--sssd.spec.in42
13 files changed, 53 insertions, 57 deletions
diff --git a/.gitignore b/.gitignore
index 76a1c380..68275427 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,3 +21,10 @@ aclocal.m4
autom4te.cache
libtool
stamp-h1
+*.m4
+depcomp
+ltmain.sh
+missing
+Makefile
+Makefile.in
+build
diff --git a/common/Makefile.am b/common/Makefile.am
index 47d7c4a9..42bd483a 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -1,19 +1,17 @@
ACLOCAL_AMFLAGS = -I m4
-
+SUBDIRS = trace collection ini dhash
if SINGLELIB
# Build all components as a single shared library
lib_LTLIBRARIES = libsssd_util.la
-libsssd_util_la_SOURCES = \
- collection/collection.c \
- collection/collection_tools.c \
- ini/ini_config.c \
- dhash/dhash.c
+libsssd_util_la_SOURCES =
+libsssd_util_la_LIBADD = \
+ collection/libcollection.la \
+ ini/libini_config.la \
+ dhash/libdhash.la
libsssd_util_la_CFLAGS = $(AM_CFLAGS) \
-I ./collection \
-I ./ini \
-I ./dhash \
-I ./trace
-else
-SUBDIRS = collection ini trace dhash
endif
diff --git a/common/collection/Makefile.am b/common/collection/Makefile.am
index 86488edd..0b8d0d03 100644
--- a/common/collection/Makefile.am
+++ b/common/collection/Makefile.am
@@ -7,17 +7,17 @@ ACLOCAL_AMFLAGS = -I m4
# Set up the pkg-config file
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = collection.pc
+dist_noinst_DATA = collection.pc
# Build library
-lib_LTLIBRARIES = libcollection.la
+noinst_LTLIBRARIES = libcollection.la
libcollection_la_SOURCES = \
collection.c \
collection_tools.c \
+ collection.h \
+ collection_tools.h \
collection_priv.h \
- trace.h
-
-include_HEADERS = collection.h collection_tools.h
+ ../trace/trace.h
# Build unit test
noinst_PROGRAMS = collection_ut
diff --git a/common/collection/configure.ac b/common/collection/configure.ac
index ed51593d..32a238ce 100644
--- a/common/collection/configure.ac
+++ b/common/collection/configure.ac
@@ -3,10 +3,7 @@ AC_CONFIG_SRCDIR([collection.c])
AC_CONFIG_AUX_DIR([build])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
-
-#Until the API is stabilized, we'll statically link
-LT_INIT([disable-shared])
-
+AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_INSTALL
diff --git a/common/dhash/Makefile.am b/common/dhash/Makefile.am
index 67e69b66..9037bf97 100644
--- a/common/dhash/Makefile.am
+++ b/common/dhash/Makefile.am
@@ -2,15 +2,16 @@ AM_CPPFLAGS = -Wall
ACLOCAL_AMFLAGS = -I m4
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = dhash.pc
+dist_noinst_DATA = dhash.pc
-lib_LTLIBRARIES = libdhash.la
-libdhash_la_SOURCES = dhash.c
-include_HEADERS = dhash.h
+noinst_LTLIBRARIES = libdhash.la
+libdhash_la_SOURCES = \
+ dhash.c \
+ dhash.h
check_PROGRAMS = dhash_test dhash_example
dhash_test_LDADD = dhash.o
dhash_example_LDADD = dhash.o
examplesdir = $(docdir)/examples
-dist_examples_DATA = dhash_test.c dhash_example.c
+dist_noinst_DATA += dhash_test.c dhash_example.c
diff --git a/common/ini/Makefile.am b/common/ini/Makefile.am
index 7278136e..03d89125 100644
--- a/common/ini/Makefile.am
+++ b/common/ini/Makefile.am
@@ -7,12 +7,13 @@ ACLOCAL_AMFLAGS = -I m4
# Set up the pkg-config file
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = ini_config.pc
+dist_noinst_DATA = ini_config.pc
# Build library
-lib_LTLIBRARIES = libini_config.la
-libini_config_la_SOURCES = ini_config.c
-include_HEADERS = ini_config.h
+noinst_LTLIBRARIES = libini_config.la
+libini_config_la_SOURCES = \
+ ini_config.c \
+ ini_config.h
# Build unit test
noinst_PROGRAMS = ini_config_ut
diff --git a/common/ini/configure.ac b/common/ini/configure.ac
index 63fb1168..3cf47967 100644
--- a/common/ini/configure.ac
+++ b/common/ini/configure.ac
@@ -3,7 +3,7 @@ AC_CONFIG_SRCDIR([ini_config.c])
AC_CONFIG_AUX_DIR([build])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
-LT_INIT([disable-shared])
+AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_INSTALL
diff --git a/common/trace/Makefile.am b/common/trace/Makefile.am
index 489a9d99..f0cefd73 100644
--- a/common/trace/Makefile.am
+++ b/common/trace/Makefile.am
@@ -1 +1 @@
-include_HEADERS = trace.h
+dist_noinst_HEADERS = trace.h
diff --git a/server/Makefile.am b/server/Makefile.am
index c18ec7c2..931e31c2 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -444,3 +444,4 @@ installsssddirs::
$(DESTDIR)$(shadow_utils_path)
install-exec-hook: installsssddirs
+
diff --git a/server/configure.ac b/server/configure.ac
index f0a1e436..def37bd7 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -17,7 +17,8 @@ AC_CONFIG_AUX_DIR([build])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AM_PROG_CC_C_O
-LT_INIT([disable-static])
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
if test "$ac_cv_prog_gcc" = yes; then
diff --git a/sss_client/Makefile.am b/sss_client/Makefile.am
index a17248d4..6347eab9 100644
--- a/sss_client/Makefile.am
+++ b/sss_client/Makefile.am
@@ -34,3 +34,4 @@ pam_sss_la_LDFLAGS = \
noinst_PROGRAMS = pam_test_client
pam_test_client_SOURCES = pam_test_client.c
pam_test_client_LDFLAGS = -lpam -lpam_misc
+
diff --git a/sss_client/configure.ac b/sss_client/configure.ac
index c9bb9412..c75ba208 100644
--- a/sss_client/configure.ac
+++ b/sss_client/configure.ac
@@ -5,7 +5,8 @@ AC_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR([build])
AM_INIT_AUTOMAKE([-Wall foreign subdir-objects])
AM_PROG_CC_C_O
-LT_INIT([disable-static])
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST(PAM_LIBS)
diff --git a/sssd.spec.in b/sssd.spec.in
index 94981b82..6945b1e3 100644
--- a/sssd.spec.in
+++ b/sssd.spec.in
@@ -1,6 +1,6 @@
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
-Release: 0%{?dist}
+Release: 1%{?dist}
Group: Applications/System
Summary: System Security Services Daemon
# The entire source code is GPLv3+ except replace/ which is LGPLv3+
@@ -63,42 +63,30 @@ services for projects like FreeIPA.
make %{?_smp_mflags}
+# Remove .la files created by libtool
+rm -f \
+ $RPM_BUILD_ROOT/%{_lib}/libnss_sss.la \
+ $RPM_BUILD_ROOT/%{_lib}/security/pam_sss.la \
+ $RPM_BUILD_ROOT/%{_libdir}/ldb/memberof.la \
+ $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_ldap.la \
+ $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_proxy.la
+
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
-# Delete files that we do not want to package for now
-# Eventually some of these will be added to a -devel package
+# Copy default sssd.conf file
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sssd
+install -m600 server/examples/sssd.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.conf
+
+# Remove .la files created by libtool
rm -f \
$RPM_BUILD_ROOT/%{_lib}/libnss_sss.la \
$RPM_BUILD_ROOT/%{_lib}/security/pam_sss.la \
- $RPM_BUILD_ROOT/%{_includedir}/collection.h \
- $RPM_BUILD_ROOT/%{_includedir}/collection_tools.h \
- $RPM_BUILD_ROOT/%{_includedir}/dhash.h \
- $RPM_BUILD_ROOT/%{_includedir}/ini_config.h \
- $RPM_BUILD_ROOT/%{_includedir}/trace.h \
- $RPM_BUILD_ROOT/%{_libdir}/ldb/memberof.a \
$RPM_BUILD_ROOT/%{_libdir}/ldb/memberof.la \
- $RPM_BUILD_ROOT/%{_libdir}/libcollection.a \
- $RPM_BUILD_ROOT/%{_libdir}/libcollection.la \
- $RPM_BUILD_ROOT/%{_libdir}/libdhash.a \
- $RPM_BUILD_ROOT/%{_libdir}/libdhash.la \
- $RPM_BUILD_ROOT/%{_libdir}/libini_config.a \
- $RPM_BUILD_ROOT/%{_libdir}/libini_config.la \
- $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/collection.pc \
- $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/dhash.pc \
- $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/ini_config.pc \
- $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_ldap.a \
$RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_ldap.la \
- $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_proxy.a \
- $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_proxy.la \
- $RPM_BUILD_ROOT/%{_docdir}/dhash/examples/dhash_example.c \
- $RPM_BUILD_ROOT/%{_docdir}/dhash/examples/dhash_test.c
-
-# Copy default sssd.conf file
-mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sssd
-install -m600 server/examples/sssd.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.conf
+ $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_proxy.la
%clean
rm -rf $RPM_BUILD_ROOT