Changeset 834 in openpam


Ignore:
Timestamp:
Oct 28, 2014, 10:25:58 AM (6 years ago)
Author:
Dag-Erling Smørgrav
Message:

Add configure options to build as much as possible using the system
libpam and / or liboath. Doing so disables building the corresponding
library and its documentation, but still builts the corresponding tools
and modules and runs the unit tests.

Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/oathkey/Makefile.am

    r780 r834  
    55bin_PROGRAMS = oathkey
    66oathkey_SOURCES = oathkey.c
    7 oathkey_LDADD = $(top_builddir)/lib/liboath/liboath.la $(top_builddir)/lib/libpam/libpam.la
     7oathkey_LDADD =
     8if WITH_SYSTEM_LIBOATH
     9oathkey_LDADD += $(SYSTEM_LIBOATH)
     10else
     11oathkey_LDADD += $(top_builddir)/lib/liboath/liboath.la
     12endif
     13if WITH_SYSTEM_LIBPAM
     14oathkey_LDADD += $(SYSTEM_LIBPAM)
     15else
     16oathkey_LDADD += $(top_builddir)/lib/libpam/libpam.la
     17endif
    818
    919dist_man1_MANS = oathkey.1
  • trunk/bin/openpam_dump_policy/Makefile.am

    r648 r834  
    55noinst_PROGRAMS = openpam_dump_policy
    66openpam_dump_policy_SOURCES = openpam_dump_policy.c
     7if WITH_SYSTEM_LIBPAM
     8openpam_dump_policy_LDADD = $(SYSTEM_LIBPAM)
     9else
    710openpam_dump_policy_LDADD = $(top_builddir)/lib/libpam/libpam.la
     11endif
  • trunk/bin/pamtest/Makefile.am

    r648 r834  
    55bin_PROGRAMS = pamtest
    66pamtest_SOURCES = pamtest.c
     7if WITH_SYSTEM_LIBPAM
     8pamtest_LDADD = $(SYSTEM_LIBPAM)
     9else
    710pamtest_LDADD = $(top_builddir)/lib/libpam/libpam.la
     11endif
    812
    913dist_man1_MANS = pamtest.1
  • trunk/bin/su/Makefile.am

    r648 r834  
    55bin_PROGRAMS = su
    66su_SOURCES = su.c
     7if WITH_SYSTEM_LIBPAM
     8su_LDADD = $(SYSTEM_LIBPAM)
     9else
    710su_LDADD = $(top_builddir)/lib/libpam/libpam.la
     11endif
    812
    913dist_man1_MANS = su.1
  • trunk/configure.ac

    r803 r834  
    8686AM_CONDITIONAL([WITH_SU], [test x"$with_su" = x"yes"])
    8787
     88AC_ARG_WITH(system-libpam,
     89    AC_HELP_STRING([--with-system-libpam], [use system libpam]),
     90    [],
     91    [with_system_libpam=no])
     92AM_CONDITIONAL([WITH_SYSTEM_LIBPAM], [test x"$with_system_libpam" = x"yes"])
     93
     94AC_ARG_WITH(system-liboath,
     95    AC_HELP_STRING([--with-system-liboath], [use system liboath]),
     96    [],
     97    [with_system_liboath=no])
     98AM_CONDITIONAL([WITH_SYSTEM_LIBOATH], [test x"$with_system_liboath" = x"yes"])
     99
    88100AC_CHECK_HEADERS([crypt.h])
    89101
     
    114126LIBS="${saved_LIBS}"
    115127AC_SUBST(CRYPTO_LIBS)
     128
     129saved_LIBS="${LIBS}"
     130LIBS=""
     131AC_CHECK_LIB([pam], [pam_start])
     132SYSTEM_LIBPAM="${LIBS}"
     133LIBS="${saved_LIBS}"
     134AC_SUBST(SYSTEM_LIBPAM)
     135
     136saved_LIBS="${LIBS}"
     137LIBS=""
     138AC_CHECK_LIB([oath], [oath_key_alloc])
     139SYSTEM_LIBOATH="${LIBS}"
     140LIBS="${saved_LIBS}"
     141AC_SUBST(SYSTEM_LIBOATH)
    116142
    117143AC_ARG_ENABLE([developer-warnings],
  • trunk/doc/man/Makefile.am

    r833 r834  
    6363
    6464if WITH_OATH
     65if !WITH_SYSTEM_LIBOATH
    6566OATH_MAN = \
    6667        oath_key_alloc.3 \
     
    7374        $(NULL)
    7475endif
     76endif
    7577
    7678EXTRA_DIST = openpam.man pam.man
    7779
     80if !WITH_SYSTEM_LIBPAM
    7881PAMCMAN = $(PAM_MAN) $(MOD_MAN) $(OPENPAM_MAN)
    7982PAMXMAN = openpam.3 pam.3
     83endif
    8084
    8185if WITH_OATH
     86if !WITH_SYSTEM_LIBOATH
    8287OATHCMAN = $(OATH_MAN)
    8388OATHXMAN = oath.3
     89endif
    8490endif
    8591
     
    108114
    109115if WITH_OATH
     116if !WITH_SYSTEM_LIBOATH
    110117oath.3: $(OATH_MAN) $(GENDOC) $(srcdir)/oath.man
    111118        perl -w $(GENDOC) -a $(OATH_MAN) <$(srcdir)/oath.man || rm $@
     119endif
    112120endif
    113121
  • trunk/lib/Makefile.am

    r648 r834  
    11# $Id$
    22
    3 SUBDIRS = libpam
     3SUBDIRS =
     4
     5if !WITH_SYSTEM_LIBPAM
     6SUBDIRS += libpam
     7endif
    48
    59if WITH_OATH
     10if !WITH_SYSTEM_LIBOATH
    611SUBDIRS += liboath
    712endif
     13endif
  • trunk/lib/liboath/Makefile.am

    r833 r834  
    2222
    2323liboath_la_LDFLAGS = -no-undefined -version-info $(LIB_MAJ)
    24 liboath_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la $(CRYPTO_LIBS)
     24if WITH_SYSTEM_LIBPAM
     25liboath_la_LIBADD = $(SYSTEM_LIBPAM)
     26else
     27liboath_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la
     28endif
     29liboath_la_LIBADD += $(CRYPTO_LIBS)
  • trunk/modules/pam_deny/Makefile.am

    r833 r834  
    1313pam_deny_la_LDFLAGS = -no-undefined -module -version-info $(LIB_MAJ) \
    1414        -export-symbols-regex '^pam_sm_'
     15if WITH_SYSTEM_LIBPAM
     16pam_deny_la_LIBADD = $(SYSTEM_LIBPAM)
     17else
    1518pam_deny_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la
     19endif
  • trunk/modules/pam_oath/Makefile.am

    r833 r834  
    1313pam_oath_la_LDFLAGS = -no-undefined -module -version-info $(LIB_MAJ) \
    1414        -export-symbols-regex '^pam_sm_'
    15 pam_oath_la_LIBADD = \
    16         $(top_builddir)/lib/libpam/libpam.la \
    17         $(top_builddir)/lib/liboath/liboath.la
     15pam_oath_la_LIBADD =
     16if WITH_SYSTEM_LIBOATH
     17pam_oath_la_LIBADD += $(SYSTEM_LIBOATH)
     18else
     19pam_oath_la_LIBADD += $(top_builddir)/lib/liboath/liboath.la
     20endif
     21if WITH_SYSTEM_LIBPAM
     22pam_oath_la_LIBADD += $(SYSTEM_LIBPAM)
     23else
     24pam_oath_la_LIBADD += $(top_builddir)/lib/libpam/libpam.la
     25endif
  • trunk/modules/pam_permit/Makefile.am

    r833 r834  
    1313pam_permit_la_LDFLAGS = -no-undefined -module -version-info $(LIB_MAJ) \
    1414        -export-symbols-regex '^pam_sm_'
     15if WITH_SYSTEM_LIBPAM
     16pam_permit_la_LIBADD = $(SYSTEM_LIBPAM)
     17else
    1518pam_permit_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la
     19endif
  • trunk/modules/pam_unix/Makefile.am

    r833 r834  
    1313pam_unix_la_LDFLAGS = -no-undefined -module -version-info $(LIB_MAJ) \
    1414        -export-symbols-regex '^pam_sm_'
     15if WITH_SYSTEM_LIBPAM
     16pam_unix_la_LIBADD = $(SYSTEM_LIBPAM)
     17else
    1518pam_unix_la_LIBADD = $(top_builddir)/lib/libpam/libpam.la $(CRYPT_LIBS)
     19endif
  • trunk/t/Makefile.am

    r760 r834  
    2020
    2121# link with libpam and libt
    22 LDADD = libt.a $(top_builddir)/lib/libpam/libpam.la
     22LDADD = libt.a
     23if WITH_SYSTEM_LIBPAM
     24LDADD += $(SYSTEM_LIBPAM)
     25else
     26LDADD += $(top_builddir)/lib/libpam/libpam.la
     27endif
    2328if WITH_OATH
     29if WITH_SYSTEM_LIBOATH
     30LDADD += $(SYSTEM_LIBOATH)
     31else
    2432LDADD += $(top_builddir)/lib/liboath/liboath.la
    2533endif
     34endif
Note: See TracChangeset for help on using the changeset viewer.