From 47575925596c2af2a78c009fcdd14de72fc82d3e Mon Sep 17 00:00:00 2001 From: "Andrew G. Morgan" Date: Sun, 19 Nov 2000 23:31:22 +0000 Subject: Relevant BUGIDs: task 15788, bugs 108297, 117476, 117474 Purpose of commit: merge in the autoconf stuff Commit summary: --------------- this is a merge of the 0-72 autoconf branch to something more up to date. This commit will be followed by merging this Linux-PAM-0-73pre-autoconf branch to the main trunk. --- modules/Simple.Rules | 90 ++++++++++++++++++++++++++++++++++++++++ modules/install_conf | 49 ++++++++++++++++++++++ modules/pam_access/install_conf | 46 -------------------- modules/pam_env/install_conf | 46 -------------------- modules/pam_group/install_conf | 46 -------------------- modules/pam_limits/install_conf | 46 -------------------- modules/pam_time/install_conf | 46 -------------------- modules/pam_unix/need_nsl.sh | 7 ---- modules/pam_userdb/libdbfound.sh | 15 ------- 9 files changed, 139 insertions(+), 252 deletions(-) create mode 100644 modules/Simple.Rules create mode 100755 modules/install_conf delete mode 100755 modules/pam_access/install_conf delete mode 100755 modules/pam_env/install_conf delete mode 100755 modules/pam_group/install_conf delete mode 100755 modules/pam_limits/install_conf delete mode 100755 modules/pam_time/install_conf delete mode 100755 modules/pam_unix/need_nsl.sh delete mode 100755 modules/pam_userdb/libdbfound.sh (limited to 'modules') diff --git a/modules/Simple.Rules b/modules/Simple.Rules new file mode 100644 index 00000000..be56e1d3 --- /dev/null +++ b/modules/Simple.Rules @@ -0,0 +1,90 @@ +# $Id$ +# +# For simple modules with no significant dependencies, set $(TITLE) +# and include this file. +# +# There are a few ways to customize this set of rules. Namely, define +# +# $(MODULE_SIMPLE_EXTRACLEAN) +# $(MODULE_SIMPLE_CLEAN) +# $(MODULE_SIMPLE_REMOVE) +# $(MODULE_SIMPLE_INSTALL) +# $(MODULE_SIMPLE_EXTRALIBS) - other things to link with the module +# + +LIBSRC = $(TITLE).c +LIBOBJ = $(TITLE).o +LIBOBJD = $(addprefix dynamic/,$(LIBOBJ)) +LIBOBJS = $(addprefix static/,$(LIBOBJ)) + +ifdef DYNAMIC +LIBSHARED = $(TITLE).so +endif + +ifdef STATIC +LIBSTATIC = lib$(TITLE).o +endif + +####################### don't edit below ####################### + +all: dirs $(LIBSHARED) $(LIBSTATIC) register + +dynamic/%.o : %.c + $(CC) $(CFLAGS) $(DYNAMIC) $(TARGET_ARCH) -c $< -o $@ + +static/%.o : %.c + $(CC) $(CFLAGS) $(STATIC) $(TARGET_ARCH) -c $< -o $@ + +dirs: +ifdef DYNAMIC + $(MKDIR) ./dynamic +endif +ifdef STATIC + $(MKDIR) ./static +endif + +register: +ifdef STATIC + ( cd .. ; ./register_static $(TITLE) $(TITLE)/$(LIBSTATIC) ) +endif + +ifdef DYNAMIC +$(LIBOBJD): $(LIBSRC) +endif + +ifdef DYNAMIC +$(LIBSHARED): $(LIBOBJD) + $(LD_D) -o $@ $(LIBOBJD) $(MODULE_SIMPLE_EXTRALIBS) $(NEED_LINK_LIB_C) + +endif + +ifdef STATIC +$(LIBOBJS): $(LIBSRC) +endif + +ifdef STATIC +$(LIBSTATIC): $(LIBOBJS) + $(LD) -r -o $@ $(LIBOBJS) $(MODULE_SIMPLE_EXTRALIBS) +endif + +install: all + $(MKDIR) $(FAKEROOT)$(SECUREDIR) +ifdef DYNAMIC + $(INSTALL) -m $(SHLIBMODE) $(LIBSHARED) $(FAKEROOT)$(SECUREDIR) +endif + $(MODULE_SIMPLE_INSTALL) + +remove: + rm -f $(FAKEROOT)$(SECUREDIR)/$(TITLE).so + $(MODULE_SIMPLE_REMOVE) + +clean: + rm -f $(LIBOBJD) $(LIBOBJS) core *~ + $(MODULE_SIMPLE_CLEAN) + rm -f *.a *.o *.so *.bak + rm -rf dynamic static + $(MODULE_SIMPLE_EXTRACLEAN) + +.c.o: + $(CC) $(CFLAGS) -c $< + diff --git a/modules/install_conf b/modules/install_conf new file mode 100755 index 00000000..80f6be29 --- /dev/null +++ b/modules/install_conf @@ -0,0 +1,49 @@ +#!/bin/bash + +FAKEROOT=$1 +CONFD=$1$2 +CONFILE=$1$3 +MODULE=$4 +CONF=$5 + +IGNORE_AGE=./.ignore_age +QUIET_INSTALL=../../.quiet_install + +echo + +if [ -f "$QUIET_INSTALL" ]; then + if [ ! -f "$CONFILE" ]; then + yes="y" + else + yes="skip" + fi +elif [ -f "$IGNORE_AGE" ]; then + echo "you don't want to be bothered with the age of your $CONFILE file" + yes="n" +elif [ ! -f "$CONFILE" ] || [ "$CONF" -nt "$CONFILE" ]; then + if [ -f "$CONFILE" ]; then + echo "An older $MODULE configuration file already exists ($CONFILE)" + echo "Do you wish to copy the $CONF file in this distribution" + echo "to $CONFILE ? (y/n) [skip] " + read yes + else + yes="y" + fi +else + yes="skip" +fi + +if [ "$yes" = "y" ]; then + mkdir -p $CONFD + echo " copying $CONF to $CONFILE" + cp $CONF $CONFILE +else + echo " Skipping $CONF installation" + if [ "$yes" = "n" ]; then + touch "$IGNORE_AGE" + fi +fi + +echo + +exit 0 diff --git a/modules/pam_access/install_conf b/modules/pam_access/install_conf deleted file mode 100755 index 0667b5ec..00000000 --- a/modules/pam_access/install_conf +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -CONFILE=$FAKEROOT"$CONFILE" -IGNORE_AGE=./.ignore_age -CONF=./access.conf -QUIET_INSTALL=../../.quiet_install -MODULE=pam_access - -echo - -if [ -f "$QUIET_INSTALL" ]; then - if [ ! -f "$CONFILE" ]; then - yes="y" - else - yes="skip" - fi -elif [ -f "$IGNORE_AGE" ]; then - echo "you don't want to be bothered with the age of your $CONFILE file" - yes="n" -elif [ ! -f "$CONFILE" ] || [ "$CONF" -nt "$CONFILE" ]; then - if [ -f "$CONFILE" ]; then - echo "An older $MODULE configuration file already exists ($CONFILE)" - echo "Do you wish to copy the $CONF file in this distribution" - echo "to $CONFILE ? (y/n) [skip] " - read yes - else - yes="y" - fi -else - yes="skip" -fi - -if [ "$yes" = "y" ]; then - mkdir -p $FAKEROOT$CONFD - echo " copying $CONF to $CONFILE" - cp $CONF $CONFILE -else - echo " Skipping $CONF installation" - if [ "$yes" = "n" ]; then - touch "$IGNORE_AGE" - fi -fi - -echo - -exit 0 diff --git a/modules/pam_env/install_conf b/modules/pam_env/install_conf deleted file mode 100755 index 4c608400..00000000 --- a/modules/pam_env/install_conf +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -CONFILE=$FAKEROOT"$CONFILE" -IGNORE_AGE=./.ignore_age -QUIET_INSTALL=../../.quiet_install -CONF=./pam_env.conf-example -MODULE=pam_env - -echo - -if [ -f "$QUIET_INSTALL" ]; then - if [ ! -f "$CONFILE" ]; then - yes="y" - else - yes="skip" - fi -elif [ -f "$IGNORE_AGE" ]; then - echo "you don't want to be bothered with the age of your $CONFILE file" - yes="n" -elif [ ! -f "$CONFILE" ] || [ "$CONF" -nt "$CONFILE" ]; then - if [ -f "$CONFILE" ]; then - echo "An older $MODULE configuration file already exists ($CONFILE)" - echo "Do you wish to copy the $CONF file in this distribution" - echo "to $CONFILE ? (y/n) [skip] " - read yes - else - yes="y" - fi -else - yes="skip" -fi - -if [ "$yes" = "y" ]; then - mkdir -p $FAKEROOT$CONFD - echo " copying $CONF to $CONFILE" - cp $CONF $CONFILE -else - echo " Skipping $CONF installation" - if [ "$yes" = "n" ]; then - touch "$IGNORE_AGE" - fi -fi - -echo - -exit 0 diff --git a/modules/pam_group/install_conf b/modules/pam_group/install_conf deleted file mode 100755 index 03bb7edb..00000000 --- a/modules/pam_group/install_conf +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -CONFILE=$FAKEROOT"$CONFILE" -IGNORE_AGE=./.ignore_age -QUIET_INSTALL=../../.quiet_install -CONF=./group.conf -MODULE=pam_group - -echo - -if [ -f "$QUIET_INSTALL" ]; then - if [ ! -f "$CONFILE" ]; then - yes="y" - else - yes="skip" - fi -elif [ -f "$IGNORE_AGE" ]; then - echo "you don't want to be bothered with the age of your $CONFILE file" - yes="n" -elif [ ! -f "$CONFILE" ] || [ "$CONF" -nt "$CONFILE" ]; then - if [ -f "$CONFILE" ]; then - echo "An older $MODULE configuration file already exists ($CONFILE)" - echo "Do you wish to copy the $CONF file in this distribution" - echo "to $CONFILE ? (y/n) [skip] " - read yes - else - yes="y" - fi -else - yes="skip" -fi - -if [ "$yes" = "y" ]; then - mkdir -p $FAKEROOT$CONFD - echo " copying $CONF to $CONFILE" - cp $CONF $CONFILE -else - echo " Skipping $CONF installation" - if [ "$yes" = "n" ]; then - touch "$IGNORE_AGE" - fi -fi - -echo - -exit 0 diff --git a/modules/pam_limits/install_conf b/modules/pam_limits/install_conf deleted file mode 100755 index d92c1f95..00000000 --- a/modules/pam_limits/install_conf +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -CONFILE=$FAKEROOT"$CONFILE" -IGNORE_AGE=./.ignore_age -QUIET_INSTALL=../../.quiet_install -CONF=./limits.skel -MODULE=pam_limits - -echo - -if [ -f "$QUIET_INSTALL" ]; then - if [ ! -f "$CONFILE" ]; then - yes="y" - else - yes="skip" - fi -elif [ -f "$IGNORE_AGE" ]; then - echo "you don't want to be bothered with the age of your $CONFILE file" - yes="n" -elif [ ! -f "$CONFILE" ] || [ "$CONF" -nt "$CONFILE" ]; then - if [ -f "$CONFILE" ]; then - echo "An older $MODULE configuration file already exists ($CONFILE)" - echo "Do you wish to copy the $CONF file in this distribution" - echo "to $CONFILE ? (y/n) [skip] " - read yes - else - yes="y" - fi -else - yes="skip" -fi - -if [ "$yes" = "y" ]; then - mkdir -p $FAKEROOT$CONFD - echo " copying $CONF to $CONFILE" - cp $CONF $CONFILE -else - echo " Skipping $CONF installation" - if [ "$yes" = "n" ]; then - touch "$IGNORE_AGE" - fi -fi - -echo - -exit 0 diff --git a/modules/pam_time/install_conf b/modules/pam_time/install_conf deleted file mode 100755 index 051d8b70..00000000 --- a/modules/pam_time/install_conf +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -CONFILE=$FAKEROOT"$CONFILE" -IGNORE_AGE=./.ignore_age -QUIET_INSTALL=../../.quiet_install -CONF=./time.conf -MODULE=pam_time - -echo - -if [ -f "$QUIET_INSTALL" ]; then - if [ ! -f "$CONFILE" ]; then - yes="y" - else - yes="skip" - fi -elif [ -f "$IGNORE_AGE" ]; then - echo "you don't want to be bothered with the age of your $CONFILE file" - yes="n" -elif [ ! -f "$CONFILE" ] || [ "$CONF" -nt "$CONFILE" ]; then - if [ -f "$CONFILE" ]; then - echo "An older $MODULE configuration file already exists ($CONFILE)" - echo "Do you wish to copy the $CONF file in this distribution" - echo "to $CONFILE ? (y/n) [skip] " - read yes - else - yes="y" - fi -else - yes="skip" -fi - -if [ "$yes" = "y" ]; then - mkdir -p $FAKEROOT$CONFD - echo " copying $CONF to $CONFILE" - cp $CONF $CONFILE -else - echo " Skipping $CONF installation" - if [ "$yes" = "n" ]; then - touch "$IGNORE_AGE" - fi -fi - -echo - -exit 0 diff --git a/modules/pam_unix/need_nsl.sh b/modules/pam_unix/need_nsl.sh deleted file mode 100755 index 23f38ec0..00000000 --- a/modules/pam_unix/need_nsl.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -list=`/bin/ls /lib/libnsl.so.* 2> /dev/null` -if [ -z "$list" ]; then - echo no -else - echo yes -fi diff --git a/modules/pam_userdb/libdbfound.sh b/modules/pam_userdb/libdbfound.sh deleted file mode 100755 index d6a1723b..00000000 --- a/modules/pam_userdb/libdbfound.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -if [ -f "/usr/include/ndbm.h" ]; then - echo "-DUSE_NDBM_H" - exit 0 -fi - -list=`/bin/ls /lib/libdb.so.* 2> /dev/null` -if [ -n "$list" ]; then - echo "" - exit 0 -fi - -echo "none" -exit 0 -- cgit v1.2.3