If CC supports the "-print-multi-os-directory" option, use it to determine where to check for the existence libcrypt. If it doesn't, then we get /usr/lib. --- ppp-2.4.3/pppd/Makefile.linux 2004-11-22 14:43:58.522728670 +0000 +++ ppp-2.4.3/pppd/Makefile.linux 2004-11-22 14:47:09.054728322 +0000 @@ -8,6 +8,7 @@ BINDIR = $(DESTDIR)/sbin MANDIR = $(DESTDIR)/share/man/man8 INCDIR = $(DESTDIR)/include +LIBDIR = $(DESTDIR)/usr/lib/$(shell gcc -print-multi-os-directory 2> /dev/null) TARGETS = pppd @@ -32,7 +33,7 @@ CC = gcc # -COPTS = -Wall $(RPM_OPT_FLAGS) +COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\" LIBS = -lutil # Uncomment the next 2 lines to include support for Microsoft's @@ -120,7 +121,7 @@ ifneq ($(wildcard /usr/include/crypt.h),) CFLAGS += -DHAVE_CRYPT_H=1 endif -ifneq ($(wildcard /usr/lib/libcrypt.*),) +ifneq ($(wildcard $(LIBDIR)/libcrypt.*),) LIBS += -lcrypt endif --- ppp-2.4.3/pppd/plugins/Makefile.linux 2004-11-22 14:43:58.528727189 +0000 +++ ppp-2.4.3/pppd/plugins/Makefile.linux 2004-11-22 14:54:10.108012609 +0000 @@ -7,7 +7,7 @@ DESTDIR = @DESTDIR@ BINDIR = $(DESTDIR)/sbin MANDIR = $(DESTDIR)/share/man/man8 -LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION) +LIBDIR = $(DESTDIR)/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION) SUBDIRS := rp-pppoe pppoatm radius # Uncomment the next line to include the radius authentication plugin If CC supports the "-print-multi-os-directory" option, use it to determine where to check for the existence libcrypt. If it doesn't, then we get /usr/lib. --- ppp-2.4.3/pppd/pathnames.h 2004-03-10 18:52:15.000000000 -0500 +++ ppp-2.4.3/pppd/pathnames.h 2004-03-10 18:52:10.000000000 -0500 @@ -55,5 +55,5 @@ #endif /* __STDC__ */ #ifdef PLUGIN -#define _PATH_PLUGIN "/usr/lib/pppd/" VERSION +#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION #endif /* PLUGIN */