aboutsummaryrefslogtreecommitdiff
path: root/crypt/Makefile
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-04-02 17:00:46 +0000
committerUlrich Drepper <drepper@redhat.com>2009-04-02 17:00:46 +0000
commitff886b82a2b65758950bdb4687cf5a1238f697a1 (patch)
tree46f1826abb9c0fba4227b39fc7ff7e91b3e94c2c /crypt/Makefile
parent900d7961d48f704b8396841efb916435faf9c374 (diff)
downloadglibc-ff886b82a2b65758950bdb4687cf5a1238f697a1.zip
glibc-ff886b82a2b65758950bdb4687cf5a1238f697a1.tar.gz
glibc-ff886b82a2b65758950bdb4687cf5a1238f697a1.tar.bz2
* configure.in: Recognize --enable-nss-crypt.
* config.make.in: Add nss-crypt entry. * crypt/Makefile: If nss-crypt==yes, don't build md5.c, sha256.c, sha512.c. Don't run md5test, sha256test, sha512test. Pass -DUSE_NSS and include path for NSS directory to compiler for md5-crypt, sha256-crypt, sha512-crypt. Link libcrypt.so with -lfreebl3. * crypt/md5-crypt.c: If USE_NSS is defined, don't use local hash function implementation, use NSS. Introduce wrappers around the hash function calls. Little code size optimization. * crypt/sha256-crypt.c: Likewise. * crypt/sha512-crypt.c: Likewise. * scripts/check-local-headers.sh: Ignore nss3 directory. * configure.in: Rename pic_default to libc_cv_pic_default. * config.make.in: Likewise.
Diffstat (limited to 'crypt/Makefile')
-rw-r--r--crypt/Makefile19
1 files changed, 15 insertions, 4 deletions
diff --git a/crypt/Makefile b/crypt/Makefile
index 28f8219..3f73d25 100644
--- a/crypt/Makefile
+++ b/crypt/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1996, 2000, 2001, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2007, 2009 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -26,10 +26,10 @@ headers := crypt.h
extra-libs := libcrypt
extra-libs-others := $(extra-libs)
-libcrypt-routines := crypt-entry md5-crypt md5 sha256-crypt sha256 \
- sha512-crypt sha512 crypt crypt_util
+libcrypt-routines := crypt-entry md5-crypt sha256-crypt sha512-crypt crypt \
+ crypt_util
-tests := cert md5test md5c-test sha256test sha256c-test sha512test sha512c-test
+tests := cert md5c-test sha256c-test sha512c-test
distribute := ufc-crypt.h crypt-private.h ufc.c speeds.c README.ufc-crypt \
Banner md5.h sha256.h sha512.h
@@ -40,9 +40,20 @@ ifeq ($(crypt-in-libc),yes)
routines += $(libcrypt-routines)
endif
+ifeq ($(nss-crypt),yes)
+CPPFLAGS-sha256-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
+CPPFLAGS-sha512-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
+CPPFLAGS-md5-crypt.c = -DUSE_NSS -I$(shell nss-config --includedir)
+$(objpfx)libcrypt.so: -lfreebl3
+else
+libcrypt-routines += md5 sha256 sha512
+
+tests += md5test sha256test sha512test
+
$(objpfx)md5test: $(objpfx)md5.o
$(objpfx)sha256test: $(objpfx)sha256.o
$(objpfx)sha512test: $(objpfx)sha512.o
+endif
include ../Rules