ipppd: configuration cleanup
* Makefile.in: expand variables HAVE_LZSCOMP_H & LIBS * Makefile.in: build man-pages in rule all * Makefile.in: don't add variables to COPTS with -D... that are already #include'd via config.h: removes "duplicate definition" warnings * ipppd.h & options.c: #include "config.h" to cover Makefile.in changes * configure.ac: relay on default action for AC_CHECK_LIB() * Makefile.in: remove unnecessary Hacks because of configure.ac changes * autoreconf
This commit is contained in:
parent
184e96038c
commit
04204decde
|
@ -3,22 +3,24 @@
|
|||
# $Id: Makefile.in,v 1.21 2008/08/31 10:49:38 keil Exp $
|
||||
#
|
||||
|
||||
HAVE_LIBSSL := @HAVE_LIBSSL@
|
||||
HAVE_LIBDES := @HAVE_LIBDES@
|
||||
HAVE_LIBCRYPT := @HAVE_LIBCRYPT@
|
||||
HAVE_SHADOW_H := @HAVE_SHADOW_H@
|
||||
HAVE_LZSCOMP_H:= @HAVE_LZSCOMP_H@
|
||||
HAVE_PCAP_BPF_H := @HAVE_PCAP_BPF_H@
|
||||
HAVE_NET_BPF_H:= @HAVE_NET_BPF_H@
|
||||
IPPP_FILTER := @CONFIG_IPPP_FILTER@
|
||||
SBINDIR := @CONFIG_SBINDIR@
|
||||
MANDIR := @CONFIG_MANDIR@
|
||||
CC := @CC@
|
||||
INSTALL := @INSTALL@
|
||||
INSTALL_DIR := $(INSTALL) -m 0755 -o 0 -g 0 -d
|
||||
INSTALL_SBIN := $(INSTALL) -m 0700 -o 0 -g 0
|
||||
INSTALL_BIN := $(INSTALL) -m 0755 -o 0 -g 0
|
||||
INSTALL_DATA := $(INSTALL) -m 0644 -o 0 -g 0
|
||||
HAVE_LIBSSL := @HAVE_LIBSSL@
|
||||
HAVE_LIBDES := @HAVE_LIBDES@
|
||||
HAVE_LIBCRYPT := @HAVE_LIBCRYPT@
|
||||
HAVE_SHADOW_H := @HAVE_SHADOW_H@
|
||||
HAVE_LZSCOMP_H := @HAVE_LZSCOMP_H@
|
||||
HAVE_PCAP_BPF_H := @HAVE_PCAP_BPF_H@
|
||||
HAVE_NET_BPF_H := @HAVE_NET_BPF_H@
|
||||
HAVE_LZSCOMP_H := @HAVE_LZSCOMP_H@
|
||||
IPPP_FILTER := @CONFIG_IPPP_FILTER@
|
||||
SBINDIR := @CONFIG_SBINDIR@
|
||||
MANDIR := @CONFIG_MANDIR@
|
||||
LIBS := @LIBS@
|
||||
CC := @CC@
|
||||
INSTALL := @INSTALL@
|
||||
INSTALL_DIR := $(INSTALL) -m 0755 -o 0 -g 0 -d
|
||||
INSTALL_SBIN := $(INSTALL) -m 0700 -o 0 -g 0
|
||||
INSTALL_BIN := $(INSTALL) -m 0755 -o 0 -g 0
|
||||
INSTALL_DATA := $(INSTALL) -m 0644 -o 0 -g 0
|
||||
RADIUS_CLIENT_CONFIG_FILE := @RADIUS_CLIENT_CONFIG_FILE@
|
||||
datarootdir = @datarootdir@
|
||||
datadir = @datadir@
|
||||
|
@ -43,7 +45,7 @@ MANPAGES = ipppd.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 environ.o readpw.o
|
||||
|
||||
all: ipppd
|
||||
all: ipppd $(MANPAGES)
|
||||
|
||||
%.8: %.man
|
||||
cp $< $@
|
||||
|
@ -78,10 +80,6 @@ COMPILE_FLAGS = @CFLAGS@
|
|||
CFLAGS = -O2 -fomit-frame-pointer -Wall -DREQ_SYSOPTIONS=0
|
||||
VER = 2.2.0
|
||||
|
||||
# it's a hack
|
||||
ifeq ($(HAVE_LIBCRYPT),1)
|
||||
LIBS = -lcrypt -lutil
|
||||
endif
|
||||
|
||||
ifeq ($(IPPP_FILTER),y)
|
||||
COPTS += -DIPPP_FILTER
|
||||
|
@ -127,18 +125,6 @@ PPPDOBJS += isexpired.o
|
|||
PPPDSRCS += isexpired.c
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LZSCOMP_H),1)
|
||||
COPTS += -DHAVE_LZSCOMP_H
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PCAP_BPF_H),1)
|
||||
COPTS += -DHAVE_PCAP_BPF_H
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NET_BPF_H),1)
|
||||
COPTS += -DHAVE_NET_BPF_H
|
||||
endif
|
||||
|
||||
%.8: %.man
|
||||
cp $< $@
|
||||
|
||||
|
@ -149,8 +135,7 @@ config.status: configure
|
|||
./config.status --recheck
|
||||
|
||||
#
|
||||
# Makefile in depencies forces rebuild after running
|
||||
# configure.
|
||||
# Makefile in depencies forces rebuild after running configure.
|
||||
#
|
||||
%.o: %.c Makefile
|
||||
$(CC) $(CFLAGS) $(COPTS) $(DEBUG_FLAGS) $(COMPILE_FLAGS) -c -o $@ $<
|
||||
|
|
|
@ -37,16 +37,16 @@
|
|||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* libbsd available */
|
||||
/* Define to 1 if you have the `bsd' library (-lbsd). */
|
||||
#undef HAVE_LIBBSD
|
||||
|
||||
/* libcrypt available */
|
||||
/* Define to 1 if you have the `crypt' library (-lcrypt). */
|
||||
#undef HAVE_LIBCRYPT
|
||||
|
||||
/* libdes available */
|
||||
/* Define to 1 if you have the `des' library (-ldes). */
|
||||
#undef HAVE_LIBDES
|
||||
|
||||
/* libssl available */
|
||||
/* Define to 1 if you have the `ssl' library (-lssl). */
|
||||
#undef HAVE_LIBSSL
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
|
|
|
@ -3118,17 +3118,20 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
|
||||
$as_echo "$ac_cv_lib_bsd_daemon" >&6; }
|
||||
if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
|
||||
HAVE_LIBBSD=1;
|
||||
$as_echo "#define HAVE_LIBBSD /**/" >>confdefs.h
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBBSD 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lbsd $LIBS"
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find libbsd" >&5
|
||||
$as_echo "$as_me: WARNING: Could not find libbsd" >&2;}
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypt" >&5
|
||||
$as_echo_n "checking for main in -lcrypt... " >&6; }
|
||||
if ${ac_cv_lib_crypt_main+:} false; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setkey in -lcrypt" >&5
|
||||
$as_echo_n "checking for setkey in -lcrypt... " >&6; }
|
||||
if ${ac_cv_lib_crypt_setkey+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
|
@ -3136,29 +3139,38 @@ LIBS="-lcrypt $LIBS"
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char setkey ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return main ();
|
||||
return setkey ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ac_cv_lib_crypt_main=yes
|
||||
ac_cv_lib_crypt_setkey=yes
|
||||
else
|
||||
ac_cv_lib_crypt_main=no
|
||||
ac_cv_lib_crypt_setkey=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_main" >&5
|
||||
$as_echo "$ac_cv_lib_crypt_main" >&6; }
|
||||
if test "x$ac_cv_lib_crypt_main" = xyes; then :
|
||||
HAVE_LIBCRYPT=1;
|
||||
$as_echo "#define HAVE_LIBCRYPT /**/" >>confdefs.h
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_setkey" >&5
|
||||
$as_echo "$ac_cv_lib_crypt_setkey" >&6; }
|
||||
if test "x$ac_cv_lib_crypt_setkey" = xyes; then :
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBCRYPT 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lcrypt $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
|
@ -3199,8 +3211,11 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_ecb_encrypt" >&5
|
||||
$as_echo "$ac_cv_lib_des_des_ecb_encrypt" >&6; }
|
||||
if test "x$ac_cv_lib_des_des_ecb_encrypt" = xyes; then :
|
||||
HAVE_LIBDES=1;
|
||||
$as_echo "#define HAVE_LIBDES /**/" >>confdefs.h
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBDES 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-ldes $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
|
@ -3241,8 +3256,11 @@ fi
|
|||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_DES_ecb_encrypt" >&5
|
||||
$as_echo "$ac_cv_lib_ssl_DES_ecb_encrypt" >&6; }
|
||||
if test "x$ac_cv_lib_ssl_DES_ecb_encrypt" = xyes; then :
|
||||
HAVE_LIBSSL=1;
|
||||
$as_echo "#define HAVE_LIBSSL /**/" >>confdefs.h
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBSSL 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lssl $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -22,15 +22,11 @@ AC_PROG_CC
|
|||
|
||||
dnl Checks for libraries.
|
||||
AC_CHECK_LIB(bsd, daemon,
|
||||
HAVE_LIBBSD=1; AC_DEFINE(HAVE_LIBBSD, [], [libbsd available]),
|
||||
,
|
||||
[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, [], [libcrypt available])])
|
||||
AC_CHECK_LIB(des, des_ecb_encrypt,
|
||||
[HAVE_LIBDES=1; AC_DEFINE(HAVE_LIBDES, [], [libdes available])])
|
||||
AC_CHECK_LIB(ssl, DES_ecb_encrypt,
|
||||
[HAVE_LIBSSL=1; AC_DEFINE(HAVE_LIBSSL, [], [libssl available])])
|
||||
AC_CHECK_LIB(crypt, setkey)
|
||||
AC_CHECK_LIB(des, des_ecb_encrypt)
|
||||
AC_CHECK_LIB(ssl, DES_ecb_encrypt)
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
|
|
@ -61,6 +61,8 @@ struct isdn_ppp_comp_data {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef PPP_LINK_CCP
|
||||
#define PPP_LINK_CCP 0x80fb
|
||||
#endif
|
||||
|
|
|
@ -35,6 +35,8 @@ char options_rcsid[] = "$Id: options.c,v 1.27 2005/08/07 13:47:50 keil Exp $";
|
|||
#include <arpa/inet.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef RADIUS
|
||||
#include <radiusclient.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue