diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-05-18 14:50:21 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-05-19 11:09:45 -0400 |
commit | 53499a31876e720597a42f59c16a4326c8c23671 (patch) | |
tree | 8238bafee3f8882ca0ecc87d30829b07ecf061d4 /sss_client | |
parent | 00259bc076cb1e66f94248b0ddc19f97ac14dc0f (diff) | |
download | sssd-53499a31876e720597a42f59c16a4326c8c23671.tar.gz sssd-53499a31876e720597a42f59c16a4326c8c23671.tar.bz2 sssd-53499a31876e720597a42f59c16a4326c8c23671.zip |
Enable automake builds for sss_client
Diffstat (limited to 'sss_client')
-rw-r--r-- | sss_client/Makefile.am | 36 | ||||
-rw-r--r-- | sss_client/Makefile.in | 89 | ||||
-rw-r--r-- | sss_client/configure.ac | 31 | ||||
-rw-r--r-- | sss_client/m4/.dir | 0 |
4 files changed, 58 insertions, 98 deletions
diff --git a/sss_client/Makefile.am b/sss_client/Makefile.am new file mode 100644 index 00000000..a17248d4 --- /dev/null +++ b/sss_client/Makefile.am @@ -0,0 +1,36 @@ +topdir=. +AM_CPPFLAGS = -I$(topdir) +ACLOCAL_AMFLAGS = -I m4 + +nsslibdir = @nsslibdir@ +pamlibdir = $(nsslibdir)/security + +nsslib_LTLIBRARIES = libnss_sss.la +pamlib_LTLIBRARIES = pam_sss.la + +libnss_sss_la_SOURCES = \ + common.c \ + passwd.c \ + group.c \ + sss_cli.h +libnss_sss_la_LDFLAGS = \ + -module \ + -version-info 2:0:0 + +pam_sss_la_SOURCES = \ + pam_sss.c \ + common.c \ + sss_cli.h + +pam_sss_la_CFLAGS = \ + -Wall \ + -Werror +pam_sss_la_LDFLAGS = \ + -lpam \ + -lpam_misc \ + -module \ + -version-info 1:0:0 + +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/Makefile.in b/sss_client/Makefile.in deleted file mode 100644 index 37156e3d..00000000 --- a/sss_client/Makefile.in +++ /dev/null @@ -1,89 +0,0 @@ -#!gmake -# -# Makefile for nss client - -CC = @CC@ -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -includedir = @includedir@ -libdir = @libdir@ -VPATH = @srcdir@ -srcdir = @srcdir@ -builddir = @builddir@ -INSTALLCMD = @INSTALL@ -CPPFLAGS = @CPPFLAGS@ -CFLAGS := $(CPPFLAGS) @CFLAGS@ $(CFLAGS) -LDFLAGS = @LDFLAGS@ -EXEEXT = @EXEEXT@ -SHLD = @SHLD@ -SHLD_FLAGS = @SHLD_FLAGS@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PICFLAG = @PICFLAG@ -SHLIBEXT = @SHLIBEXT@ -LIB_PATH_VAR = @LIB_PATH_VAR@ - -NSS_SSS_SOLIB = libnss_sss.$(SHLIBEXT) -NSS_SSS_SONAME = libnss_sss.$(SHLIBEXT).2 - -NSS_SSS_OBJS = common.o passwd.o group.o - -PAM_SSS_SOLIB = pam_sss.$(SHLIBEXT) -PAM_SSS_OBJS = pam_sss.o common.o -PAM_LIBS = -lpam -lpam_misc -PAM_CFLAGS = -Wall -Werror - -PAM_CLIENT = pam_test_client -PAM_CLIENT_OBJS = pam_test_client.o - -default: all - -showflags: - @echo 'Compile flags:' - @echo ' CFLAGS = $(CFLAGS)' - @echo ' CPPFLAGS = $(CPPFLAGS)' - @echo ' LDFLAGS = $(LDFLAGS)' - @echo ' LIBS = $(LIBS)' - -.SUFFIXES: .c .o - -.c.o: - @echo Compiling $*.c - @$(CC) $(PICFLAG) $(CFLAGS) -c $< -o $@ - -$(NSS_SSS_SOLIB): $(NSS_SSS_OBJS) - $(SHLD) $(SHLD_FLAGS) -o $@ $(NSS_SSS_OBJS) @SONAMEFLAG@$(NSS_SSS_SONAME) - -$(NSS_SSS_SONAME): $(NSS_SSS_SOLIB) - ln -fs $< $@ - -pam_sss.o: pam_sss.c - @echo Compiling $*.c - @$(CC) $(PICFLAG) $(CFLAGS) $(PAM_CFLAGS) -c $< -o $@ - -$(PAM_CLIENT): $(PAM_CLIENT_OBJS) - @$(CC) $(CFLAGS) $(PAM_CFLAGS) $< -o $@ $(PAM_LIBS) - -$(PAM_SSS_SOLIB): $(PAM_SSS_OBJS) - $(SHLD) $(SHLD_FLAGS) -o $@ $(PAM_SSS_OBJS) $(PAM_LIBS) - -all: showflags $(NSS_SSS_OBJS) $(NSS_SSS_SOLIB) $(NSS_SSS_SONAME) $(PAM_SSS_SOLIB) $(PAM_CLIENT) - -install: all - $(INSTALLCMD) -d $(DESTDIR)${libdir} - $(INSTALLCMD) -m 755 $(NSS_SSS_SOLIB) $(DESTDIR)${libdir} - ln -fs $(NSS_SSS_SOLIB) $(DESTDIR)${libdir}/$(NSS_SSS_SONAME) - $(INSTALLCMD) -d $(DESTDIR)${libdir}/security - $(INSTALLCMD) -m 755 $(PAM_SSS_SOLIB) $(DESTDIR)${libdir}/security - -clean: - rm -f *.o *.a */*.o - rm -f $(NSS_SSS_SOLIB) $(NSS_SSS_SONAME) $(PAM_SSS_SOLIB) $(PAM_CLIENT) - -distclean: clean - rm -f config.log config.status config.h config.cache - rm -f Makefile - rm -f *~ */*~ - -realdistclean: distclean - rm -f configure config.h.in diff --git a/sss_client/configure.ac b/sss_client/configure.ac index 94b4f6b8..95a80562 100644 --- a/sss_client/configure.ac +++ b/sss_client/configure.ac @@ -1,13 +1,26 @@ AC_PREREQ(2.50) -AC_INIT(nss_sss, 0.3.3) +AC_INIT([sss_client], 0.4.0, [sgallagh@redhat.com]) +AC_CONFIG_SRCDIR([common.c]) AC_CONFIG_HEADER(config.h) +AC_CONFIG_AUX_DIR([build]) +AM_INIT_AUTOMAKE([-Wall foreign subdir-objects]) +AM_PROG_CC_C_O +AC_PROG_LIBTOOL +AC_CONFIG_MACRO_DIR([m4]) -AC_LIBREPLACE_ALL_CHECKS -AC_LD_SONAMEFLAG -AC_LD_PICFLAG -AC_LD_SHLIBEXT -AC_LIBREPLACE_SHLD -AC_LIBREPLACE_SHLD_FLAGS -AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR +AC_SUBST(PAM_LIBS) -AC_OUTPUT(Makefile) +#Check for PAM headers +AC_CHECK_HEADERS([security/pam_appl.h security/pam_misc.h security/pam_modules.h], + [AC_CHECK_LIB(pam, pam_get_item, [ PAM_LIBS="-lpam" ], [AC_MSG_ERROR([PAM must support pam_get_item])])], + [AC_MSG_ERROR([PAM development libraries not installed])] +) + +#Set the NSS library install path +AC_ARG_ENABLE([nsslibdir], [AS_HELP_STRING([--enable-nssdir], + [Where to install nss libraries ($(prefix)/lib)])], + [nsslibdir=$enableval], + [nsslibdir=$prefix/lib64]) +AC_SUBST(nsslibdir) +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/sss_client/m4/.dir b/sss_client/m4/.dir new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/sss_client/m4/.dir |