Skip to content
Snippets Groups Projects
Commit 60ea34b0 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Changes:

* reverse the change #include <> -> "" in krb.c.
  It _must not_ include files in "."
* Makefile update.  Inconsistent var usage and SHLIB was
  not set.

Now it should work with all external libs.

arko Kreen
parent d18c1d1f
No related branches found
No related tags found
No related merge requests found
# #
# $Header: /cvsroot/pgsql/contrib/pgcrypto/Makefile,v 1.2 2001/01/24 03:46:16 momjian Exp $ # $Header: /cvsroot/pgsql/contrib/pgcrypto/Makefile,v 1.3 2001/02/20 15:34:14 momjian Exp $
# #
subdir = contrib/pgcrypto subdir = contrib/pgcrypto
...@@ -12,34 +12,37 @@ cryptolib = builtin ...@@ -12,34 +12,37 @@ cryptolib = builtin
########################## ##########################
ifeq ($(cryptolib), builtin) ifeq ($(cryptolib), builtin)
CRYPTO_CFLAGS =
CRYPTO_LDFLAGS =
SRCS = md5.c sha1.c internal.c SRCS = md5.c sha1.c internal.c
endif endif
ifeq ($(cryptolib), openssl) ifeq ($(cryptolib), openssl)
cryptoinc := -I/usr/include/openssl CRYPTO_CFLAGS = -I/usr/include/openssl
cryptolib := -lcrypto CRYPTO_LDFLAGS = -lcrypto
SRCS = openssl.c SRCS = openssl.c
endif endif
ifeq ($(cryptolib), mhash) ifeq ($(cryptolib), mhash)
cryptoinc= CRYPTO_CFLAGS = -I/usr/local/include
cryptolib=-lmhash CRYPTO_LDFLAGS = -L/usr/local/lib -lmhash
SRCS = mhash.c SRCS = mhash.c
endif endif
ifeq ($(cryptolib), krb5) ifeq ($(cryptolib), krb5)
cryptoinc=-I/usr/include CRYPTO_CFLAGS = -I/usr/include
cryptolib=-ldes CRYPTO_LDFLAGS = -ldes
SRCS = krb.c SRCS = krb.c
endif endif
NAME := pgcrypto NAME := pgcrypto
SRCS += pgcrypto.c encode.c SRCS += pgcrypto.c encode.c
OBJS := $(SRCS:.c=.o) OBJS := $(SRCS:.c=.o)
SHLIB_LINK := $(CRYPTO_LDFLAGS)
SO_MAJOR_VERSION = 0 SO_MAJOR_VERSION = 0
SO_MINOR_VERSION = 1 SO_MINOR_VERSION = 1
override CPPFLAGS += -I$(srcdir) $(cryptoinc) override CPPFLAGS += $(CRYPTO_CFLAGS) -I$(srcdir)
all: all-lib $(NAME).sql all: all-lib $(NAME).sql
... ...
......
...@@ -31,15 +31,15 @@ ...@@ -31,15 +31,15 @@
* It is possible that this works with other SHA1/MD5 * It is possible that this works with other SHA1/MD5
* implementations too. * implementations too.
* *
* $Id: krb.c,v 1.2 2001/02/10 02:31:25 tgl Exp $ * $Id: krb.c,v 1.3 2001/02/20 15:34:14 momjian Exp $
*/ */
#include "postgres.h" #include "postgres.h"
#include "pgcrypto.h" #include "pgcrypto.h"
#include "md5.h" #include <md5.h>
#include "sha.h" #include <sha.h>
#ifndef MD5_DIGEST_LENGTH #ifndef MD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16 #define MD5_DIGEST_LENGTH 16
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment