summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew G. Morgan <morgan@kernel.org>2000-11-19 23:31:22 +0000
committerAndrew G. Morgan <morgan@kernel.org>2000-11-19 23:31:22 +0000
commit47575925596c2af2a78c009fcdd14de72fc82d3e (patch)
tree2c353e5c8dc7a2b019b1d30853957021af631a42 /modules
parent8c7e950878780872acf82e924f58369c907ddbcb (diff)
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/Simple.Rules90
-rwxr-xr-xmodules/install_conf (renamed from modules/pam_time/install_conf)11
-rwxr-xr-xmodules/pam_access/install_conf46
-rwxr-xr-xmodules/pam_env/install_conf46
-rwxr-xr-xmodules/pam_group/install_conf46
-rwxr-xr-xmodules/pam_limits/install_conf46
-rwxr-xr-xmodules/pam_unix/need_nsl.sh7
-rwxr-xr-xmodules/pam_userdb/libdbfound.sh15
8 files changed, 97 insertions, 210 deletions
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/pam_time/install_conf b/modules/install_conf
index 051d8b70..80f6be29 100755
--- a/modules/pam_time/install_conf
+++ b/modules/install_conf
@@ -1,10 +1,13 @@
#!/bin/bash
-CONFILE=$FAKEROOT"$CONFILE"
+FAKEROOT=$1
+CONFD=$1$2
+CONFILE=$1$3
+MODULE=$4
+CONF=$5
+
IGNORE_AGE=./.ignore_age
QUIET_INSTALL=../../.quiet_install
-CONF=./time.conf
-MODULE=pam_time
echo
@@ -31,7 +34,7 @@ else
fi
if [ "$yes" = "y" ]; then
- mkdir -p $FAKEROOT$CONFD
+ mkdir -p $CONFD
echo " copying $CONF to $CONFILE"
cp $CONF $CONFILE
else
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_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