From 9310ea4d89cbdfebe7eb00a7c021e024364541c7 Mon Sep 17 00:00:00 2001 From: ian Date: Wed, 13 Oct 1999 01:16:30 +0000 Subject: [PATCH] + * Dynamically linked clients now made with -l, so as to avoid rpath. @@ -43,6 +43,8 @@ + * Dynamically linked clients now made with -l, so as to avoid rpath. + * Do not use $^ in make rules (should help with non-GNU make). --- changelog | 2 ++ client/Makefile.in | 20 ++++++++++++-------- configure | 9 +++++++-- configure.in | 8 ++++++-- dynamic/Makefile.in | 8 +++++++- settings.make.in | 1 + 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/changelog b/changelog index b2bac0b..d4fe568 100644 --- a/changelog +++ b/changelog @@ -43,6 +43,8 @@ adns (0.5) unstable; urgency=high * Don't complain so much about poll(2) tests if not available. * Do not give -u 0 -g 0 options to install. * Remove trailing , from some enums in adns.h. + * Dynamically linked clients now made with -l, so as to avoid rpath. + * Do not use $^ in make rules (should help with non-GNU make). -- diff --git a/client/Makefile.in b/client/Makefile.in index d55057e..276bc5e 100644 --- a/client/Makefile.in +++ b/client/Makefile.in @@ -34,6 +34,10 @@ DIRCFLAGS= -I$(srcdir)/../src ADH_OBJS= adh-main.o adh-opts.o adh-query.o +STATIC_LIB= $(srcdir)/../src/libadns.a +DYNAMIC_DEP= $(srcdir)/../dynamic/$(SHLIBFILE) +DYNAMIC_LINK= -L$(srcdir)/../dynamic -ladns + all: $(TARGETS) install: $(TARG_INSTALL) @@ -45,14 +49,14 @@ uninstall: $(ADH_OBJS): adnshost.h -adnshost: $(ADH_OBJS) $(srcdir)/../dynamic/$(SHLIBFILE) - $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) +adnshost: $(ADH_OBJS) $(DYNAMIC_DEP) + $(CC) $(LDFLAGS) $(ADH_OBJS) $(DYNAMIC_LINK) -o $@ $(LDLIBS) -adnshost_s: $(ADH_OBJS) $(srcdir)/../src/libadns.a - $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) +adnshost_s: $(ADH_OBJS) $(STATIC_LIB) + $(CC) $(LDFLAGS) $(ADH_OBJS) $(STATIC_LIB) -o $@ $(LDLIBS) -%: %.o $(srcdir)/../dynamic/$(SHLIBFILE) - $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) +%: %.o $(DYNAMIC_DEP) + $(CC) $(LDFLAGS) $< $(DYNAMIC_LINK) -o $@ $(LDLIBS) -%_s: %.o $(srcdir)/../src/libadns.a - $(CC) $(LDFLAGS) $^ -o $@ $(LDLIBS) +%_s: %.o $(STATIC_LIB) + $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) diff --git a/configure b/configure index c985c5a..07699c0 100755 --- a/configure +++ b/configure @@ -1396,12 +1396,16 @@ fi + + SHLIBCC='$(CC) $(CFLAGS) -fpic' MKSHLIB_1='$(CC) $(LDFLAGS) -shared -Wxl,soname=$(SONAME) -o' MKSHLIB_2='' MKSHLIB_3='-lc' -SHLIBFILE='libadns.so.$(MAJOR).$(MINOR)' -SHLIBSONAME='libadns.so.$(MAJOR)' + +SHLIBFORLINK='libadns.so' +SHLIBSONAME='$(SHLIBFORLINK).$(MAJOR)' +SHLIBFILE='$(SHLIBSONAME).$(MINOR)' trap '' 1 2 15 cat > confcache <<\EOF @@ -1543,6 +1547,7 @@ s%@SHLIBCC@%$SHLIBCC%g s%@MKSHLIB_1@%$MKSHLIB_1%g s%@MKSHLIB_2@%$MKSHLIB_2%g s%@MKSHLIB_3@%$MKSHLIB_3%g +s%@SHLIBFORLINK@%$SHLIBFORLINK%g s%@SHLIBFILE@%$SHLIBFILE%g s%@SHLIBSONAME@%$SHLIBSONAME%g diff --git a/configure.in b/configure.in index c6e4a39..671f26e 100644 --- a/configure.in +++ b/configure.in @@ -72,6 +72,8 @@ AC_SUBST(SHLIBCC) AC_SUBST(MKSHLIB_1) AC_SUBST(MKSHLIB_2) AC_SUBST(MKSHLIB_3) + +AC_SUBST(SHLIBFORLINK) AC_SUBST(SHLIBFILE) AC_SUBST(SHLIBSONAME) @@ -79,8 +81,10 @@ SHLIBCC='$(CC) $(CFLAGS) -fpic' MKSHLIB_1='$(CC) $(LDFLAGS) -shared -Wxl,soname=$(SONAME) -o' MKSHLIB_2='' MKSHLIB_3='-lc' -SHLIBFILE='libadns.so.$(MAJOR).$(MINOR)' -SHLIBSONAME='libadns.so.$(MAJOR)' + +SHLIBFORLINK='libadns.so' +SHLIBSONAME='$(SHLIBFORLINK).$(MAJOR)' +SHLIBFILE='$(SHLIBSONAME).$(MINOR)' AC_OUTPUT( settings.make Makefile diff --git a/dynamic/Makefile.in b/dynamic/Makefile.in index 5ed6388..87b95d7 100644 --- a/dynamic/Makefile.in +++ b/dynamic/Makefile.in @@ -24,7 +24,7 @@ srcdir= @srcdir@ VPATH= @srcdir@ -TARGETS= $(SHLIBFILE) +TARGETS= $(SHLIBFILE) $(SHLIBSONAME) $(SHLIBFORLINK) include $(srcdir)/../settings.make include $(srcdir)/../src/adns.make @@ -36,6 +36,12 @@ install: uninstall: rm -f $(lib_dir)/$(SHLIBFILE) +$(SHLIBFORLINK): + ln -s $(SHLIBSONAME) $(SHLIBFORLINK) + +$(SHLIBSONAME): + ln -s $(SHLIBFILE) $(SHLIBSONAME) + $(SHLIBFILE): $(ALLOBJS) rm -f $@ $(MKSHLIB_1) $@ $(MKSHLIB_2) $(ALLOBJS) $(LDLIBS) $(MKSHLIB_3) diff --git a/settings.make.in b/settings.make.in index 0967cd5..95932cb 100644 --- a/settings.make.in +++ b/settings.make.in @@ -26,6 +26,7 @@ MAJOR= 0 MINOR= 1 SHLIBFILE= @SHLIBFILE@ SHLIBSONAME= @SHLIBSONAME@ +SHLIBFORLINK= @SHLIBFORLINK@ CC= @CC@ CFLAGS= $(AUTOCFLAGS) $(WARNS) $(WERROR) $(DIRCFLAGS) $(XCFLAGS) -- 2.30.2