$NetBSD: patch-ab,v 1.1.1.1 2003/12/18 16:39:18 agc Exp $ --- Makefile.in.orig 2002-09-30 21:33:55.000000000 +0100 +++ Makefile.in 2003-12-18 10:24:07.000000000 +0000 @@ -26,11 +26,20 @@ install_dir=@INSTALL@ -d sbindir=@sbindir@ +OPSYS= $(shell uname -s) + OBJS=auth.o debug.o dgram.o main.o md5.o network.o options.o peer.o session.o tunnel.o utils.o -EXTRA_LIBS=@LIBEVENT@/*.o -ldl + +ifeq (${OPSYS}, Linux) +EXTRA_LIBS=-ldl +DYNAMIC_FLAGS= -rdynamic +endif + +ifeq (${OPSYS}, NetBSD) +endif SRCS=$(OBJS:.o=.c) -CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" +CFLAGS=-g -I.. -I@LIBEVENT@ -Wall -Wstrict-prototypes -ansi -pedantic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\" -DPREFIX=\"$(prefix)\" -DSYSCONFDIR=\""@sysconfdir@"\" TARGETS=l2tpd libl2tp.a handlers @@ -43,7 +52,7 @@ l2tpd: libl2tp.a libevent/libevent.a $(MAKE) -C handlers - @CC@ -o l2tpd -rdynamic $(OBJS) $(EXTRA_LIBS) + @CC@ -o l2tpd $(DYNAMIC_FLAGS) $(OBJS) @LIBEVENT@/*.o $(EXTRA_LIBS) libevent/libevent.a: test -d libevent || ln -s ../libevent . @@ -82,8 +91,7 @@ install: all -mkdir -p $(RPM_INSTALL_ROOT)$(sbindir) $(install) -m 755 -s l2tpd $(RPM_INSTALL_ROOT)$(sbindir) - -mkdir -p $(RPM_INSTALL_ROOT)/etc/l2tp - $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)/etc/l2tp/l2tp.conf.example + $(install) -m 644 l2tp.conf $(RPM_INSTALL_ROOT)${PREFIX}/share/examples/l2tp.conf -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man8 -mkdir -p $(RPM_INSTALL_ROOT)$(mandir)/man5 $(install) -m 644 man/l2tpd.8 $(RPM_INSTALL_ROOT)$(mandir)/man8