1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

Fix make test_pam_modules

In Samba3 there is a very handy Makefile target 'test_pam_modules'. It let
quickly veryfy, that obtained PAM module actually is loadable and doesn't
miss any dependency libs. the only problem that on FreeBSD it doesn't work
OOTB, as it unconditionally adds -ldl to the list of libraries when FreeBSD
doesn't have it and doesn't need it.

This small patch fixes the problem for FreeBSD and, I hope, still valid
for othe systems, where -ldl is required. Has to be tested there though.

With regards,
Timur Bakeyev.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Timur I. Bakeyev 2009-06-07 17:05:23 +00:00 committed by Stefan Metzmacher
parent a7cd66728b
commit ef9773c8e7
2 changed files with 3 additions and 2 deletions

View File

@ -53,6 +53,7 @@ AWK=@AWK@
PICFLAG=@PICFLAG@ PICFLAG=@PICFLAG@
DYNEXP=@DYNEXP@ DYNEXP=@DYNEXP@
PERL=@PERL@ PERL=@PERL@
LIBDL=@LIBDL@
PIDL_ARGS=@PIDL_ARGS@ PIDL_ARGS=@PIDL_ARGS@
@ -3164,7 +3165,7 @@ test_pam_modules:: pam_modules
@$(LIB_PATH_VAR)=./bin && \ @$(LIB_PATH_VAR)=./bin && \
export $(LIB_PATH_VAR) && \ export $(LIB_PATH_VAR) && \
for module in $(PAM_MODULES); do \ for module in $(PAM_MODULES); do \
./script/tests/dlopen.sh -lpam -ldl bin/$${module}.@SHLIBEXT@ \ ./script/tests/dlopen.sh -lpam ${LIBDL} bin/$${module}.@SHLIBEXT@ \
|| exit 1; \ || exit 1; \
done done

View File

@ -67,7 +67,7 @@ for arg in $@ ; do
esac esac
done done
${CC:-gcc} $RPM_OPT_FLAGS $CFLAGS -o $tempdir/dlopen $cflags $tempdir/dlopen.c $ldflags -ldl ${CC:-gcc} $RPM_OPT_FLAGS $CFLAGS -o $tempdir/dlopen $cflags $tempdir/dlopen.c $ldflags
retval=0 retval=0
for module in $modules ; do for module in $modules ; do