Added autoconf support for ipppd, renamed Makefile.linux to Makefile.ORG

This commit is contained in:
fritz 1997-03-24 01:17:55 +00:00
parent 3b5555f28f
commit 31146bd276
8 changed files with 2059 additions and 6 deletions

4
ipppd/.Config.in Normal file
View File

@ -0,0 +1,4 @@
mainmenu_option next_comment
comment 'Options for ipppd'
bool 'Support for MS chap secrets' CONFIG_IPPD_MSCHAP
endmenu

View File

@ -1,6 +1,6 @@
#
# pppd makefile for Linux
# $Id: Makefile.linux,v 1.1 1997/03/07 16:01:01 hipp Exp $
# $Id: Makefile.ORIG,v 1.1 1997/03/24 01:17:55 fritz Exp $
#
# These are set from the main Makefile

103
ipppd/Makefile.in Normal file
View File

@ -0,0 +1,103 @@
#
# pppd makefile for Linux
# $Id: Makefile.in,v 1.1 1997/03/24 01:17:56 fritz Exp $
#
HAVE_LIBBSD := @HAVE_LIBBSD@
HAVE_LIBDES := @HAVE_LIBDES@
HAVE_LIBCRYPT := @HAVE_LIBCRYPT@
HAVE_SHADOW_H := @HAVE_SHADOW_H@
CC := @CC@
ifeq (../.config,$(wildcard ../.config))
include ../.config
SBINDIR = $(CONFIG_SBINDIR)
MANDIR = $(CONFIG_MANDIR)
ifeq ($(CONFIG_IPPD_MSCHAP),y)
USE_MSCHAP = 1
endif
else
SBINDIR = /sbin
MANDIR = /usr/man
endif
PPPDSRCS = main.c magic.c fsm.c lcp.c ipcp.c upap.c chap.c md5.c ccp.c \
ipxcp.c auth.c options.c sys-linux.c cbcp.c
HEADERS = callout.h pathnames.h patchlevel.h chap.h md5.h \
ipxcp.h cbcp.h
MANPAGES = pppd.8
PPPDOBJS = main.o magic.o fsm.o lcp.o ipcp.o upap.o chap.o md5.o ccp.o \
auth.o options.o sys-linux.o cbcp.o ipxcp.o
ifeq ($(HAVE_LIBBSD),1)
all: ipppd
install: ipppd
mkdir -p $(SBINDIR) $(MANDIR)
install -s -c -m 555 -o 0 ipppd $(SBINDIR)/ipppd
install -c -m 555 -o 0 ipppd.8 $(MANDIR)/man8
else
all:
@echo -n "\n\nLibrary libbsd not found, ipppd NOT built\n\n"
install:
@echo -n "\n\nLibrary libbsd not found, ipppd NOT installed\n\n"
endif
#
# include dependancies if present and backup if as a header file
ifeq (.depend,$(wildcard .depend))
include .depend
HEADERS := $(HEADERS) .depend
endif
DEBUG_FLAGS = -DDEBUGALL
COMPILE_FLAGS = -Dlint
COPTS =
CFLAGS = -O2 -fomit-frame-pointer -m486 -Wall
VER = 2.2.0
LIBS = -lbsd
SOURCE = RELNOTES configure *.in $(PPPDSRCS) $(HEADERS) $(MANPAGES)
MSG = ''
ifdef USE_MSCHAP
ifeq ($(HAVE_LIBDES),1)
PPPDSRCS += md4.c chap_ms.c
PPPDOBJS += md4.o chap_ms.o
HEADERS += md4.h chap_ms.h
COPTS += -DUSE_MSCHAP
LIBS += -ldes
else
MSG = '\n\nLibrary libdes not found, USE_MSCHAP disabled\n\n'
endif
endif
ifeq ($(HAVE_SHADOW_H),1)
PPPDOBJS += isexpired.o
PPPDSRCS += isexpired.c
endif
%.o: %.c
$(CC) $(CFLAGS) $(COPTS) $(DEBUG_FLAGS) $(COMPILE_FLAGS) -c -o $@ $<
ipppd: $(PPPDOBJS)
$(CC) $(CFLAGS) -o ipppd $(PPPDOBJS) $(LIBS)
@echo -n $(MSG)
pppd.tar: $(SOURCE)
tar -cvf pppd.tar $(SOURCE)
pppd.tar.gz: pppd.tar
gzip pppd.tar
clean:
rm -f $(PPPDOBJS) ipppd *~ #* core
distclean: clean
rm -f config.h config.status config.cache config.log Makefile
depend:
$(CPP) -M $(CFLAGS) $(COPTS) $(DEBUG_FLAGS) $(COMPILE_FLAGS) $(PPPDSRCS) >.depend

View File

@ -37,7 +37,7 @@
*/
#ifndef lint
static char rcsid[] = "$Id: auth.c,v 1.1 1997/03/07 16:01:07 hipp Exp $";
static char rcsid[] = "$Id: auth.c,v 1.2 1997/03/24 01:17:57 fritz Exp $";
#endif
#include <stdio.h>
@ -54,7 +54,8 @@ static char rcsid[] = "$Id: auth.c,v 1.1 1997/03/07 16:01:07 hipp Exp $";
#include <netinet/in.h>
#include <arpa/inet.h>
#ifdef HAS_SHADOW
#include "config.h"
#ifdef HAVE_SHADOW_H
#include <shadow.h>
#ifndef PW_PPP
#define PW_PPP PW_LOGIN
@ -645,7 +646,7 @@ static int login(char *user,char *passwd,char **msg,int *msglen,int unit)
char *epasswd;
char *tty;
#ifdef HAS_SHADOW
#ifdef HAVE_SHADOW_H
struct spwd *spwd;
extern int isexpired (struct passwd *, struct spwd *);
#endif
@ -654,7 +655,7 @@ static int login(char *user,char *passwd,char **msg,int *msglen,int unit)
return (UPAP_AUTHNAK);
}
#ifdef HAS_SHADOW
#ifdef HAVE_SHADOW_H
/* try to deal with shadow */
spwd = getspnam(user);
if (spwd) {

1902
ipppd/configure vendored Executable file

File diff suppressed because it is too large Load Diff

39
ipppd/configure.in Normal file
View File

@ -0,0 +1,39 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(auth.c)
AC_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for libraries.
AC_CHECK_LIB(bsd, daemon,HAVE_LIBBSD=1; AC_DEFINE(HAVE_LIBBSD),
AC_MSG_WARN(Could not find libbsd, build disabled))
dnl Replace `main' with a function in -lcrypt:
AC_CHECK_LIB(crypt, main,HAVE_LIBCRYPT=1; AC_DEFINE(HAVE_LIBCRYPT))
AC_CHECK_LIB(des, des_ecb_encrypt, HAVE_LIBDES=1; AC_DEFINE(HAVE_LIBDES))
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(fcntl.h limits.h paths.h sys/file.h sys/ioctl.h sys/time.h syslog.h unistd.h)
AC_CHECK_HEADER(shadow.h, HAVE_SHADOW_H=1; AC_DEFINE(HAVE_SHADOW_H))
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_PID_T
AC_HEADER_TIME
AC_TYPE_UID_T
dnl Checks for library functions.
AC_TYPE_GETGROUPS
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(gethostname gettimeofday select socket strdup strerror strtol strtoul uname)
AC_SUBST(HAVE_LIBDES)
AC_SUBST(HAVE_LIBCRYPT)
AC_SUBST(HAVE_LIBBSD)
AC_SUBST(HAVE_SHADOW_H)
AC_OUTPUT(Makefile)

2
ipppd/install-sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exit 0

View File

@ -1,9 +1,11 @@
/*
* define path names
*
* $Id: pathnames.h,v 1.1 1997/03/07 16:01:36 hipp Exp $
* $Id: pathnames.h,v 1.2 1997/03/24 01:18:01 fritz Exp $
*/
#include "config.h"
#ifdef HAVE_PATHS_H
# include <paths.h>
#else