Commit 4cf5a322 authored by Niels Möller's avatar Niels Möller

Stop using automake. Replaced each Makefile.am with a hand-written

Makefile.in.
* configure.ac: New output variable CCPIC_MAYBE. New output file
config.make. Replaced automake constructions.

Rev: src/nettle/Makefile.am:1.81(DEAD)
Rev: src/nettle/Makefile.in:1.1
Rev: src/nettle/configure.ac:1.45
Rev: src/nettle/examples/Makefile.am:1.22(DEAD)
Rev: src/nettle/examples/Makefile.in:1.1
Rev: src/nettle/testsuite/Makefile.am:1.42(DEAD)
Rev: src/nettle/testsuite/Makefile.in:1.1
Rev: src/nettle/tools/Makefile.am:1.8(DEAD)
Rev: src/nettle/tools/Makefile.in:1.1
parent 504dff42
SUBDIRS = . tools testsuite examples
noinst_PROGRAMS = aesdata desdata shadata
libnettleincludedir = $(includedir)/nettle
lib_LIBRARIES = libnettle.a
libnettleinclude_HEADERS = aes.h arcfour.h arctwo.h bignum.h blowfish.h \
base16.h base64.h buffer.h cast128.h \
cbc.h \
des.h des-compat.h dsa.h \
hmac.h \
knuth-lfib.h \
macros.h \
md2.h md4.h \
md5.h md5-compat.h \
memxor.h \
nettle-meta.h \
pgp.h pkcs1.h realloc.h rsa.h rsa-compat.h \
sexp.h \
serpent.h sha.h twofish.h \
yarrow.h
nodist_libnettleinclude_HEADERS = nettle-types.h
noinst_HEADERS = aes-internal.h cast128_sboxes.h desinfo.h desCode.h \
serpent_sboxes.h nettle-internal.h
libnettle_a_SOURCES = aes.c \
aes-decrypt-table.c aes-decrypt.c \
aes-encrypt-table.c aes-encrypt.c \
aes-set-encrypt-key.c aes-set-decrypt-key.c aes-meta.c \
arcfour.c arcfour-crypt.c arcfour-meta.c \
arctwo.c arctwo-meta.c \
base16-encode.c base16-decode.c base16-meta.c \
base64-encode.c base64-decode.c base64-meta.c \
cast128.c cast128-meta.c \
blowfish.c \
cbc.c \
des.c \
des3.c des-compat.c \
hmac.c hmac-md5.c hmac-sha1.c hmac-sha256.c \
knuth-lfib.c \
md2.c md2-meta.c md4.c md4-meta.c \
md5.c md5-compat.c md5-meta.c \
sha1.c sha1-compress.c sha1-meta.c sha256.c sha256-meta.c \
serpent.c serpent-meta.c \
twofish.c twofish-meta.c \
yarrow256.c yarrow_key_event.c \
sexp.c sexp-format.c \
sexp-transport.c sexp-transport-format.c \
bignum.c bignum-random.c sexp2bignum.c \
pkcs1.c pkcs1-rsa-md5.c pkcs1-rsa-sha1.c \
rsa.c rsa-sign.c rsa-verify.c \
rsa-md5-sign.c rsa-md5-verify.c \
rsa-sha1-sign.c rsa-sha1-verify.c \
rsa-encrypt.c rsa-decrypt.c \
rsa-keygen.c rsa-compat.c \
rsa2sexp.c sexp2rsa.c \
dsa.c dsa-sign.c dsa-verify.c dsa-keygen.c \
sexp2dsa.c \
pgp-encode.c rsa2openpgp.c \
buffer.c buffer-init.c realloc.c \
nettle-internal.c
libnettle_a_CFLAGS = $(CCPIC)
LIBOBJS = @LIBOBJS@
libnettle_a_LIBADD = $(LIBOBJS)
shadata_LDADD = -lm
info_TEXINFOS = nettle.texinfo
all-local: nettle.html
EXTRA_DIST = $(des_headers) descore.README nettle.html \
sha-example.c .bootstrap $(des_headers) \
sparc/aes.asm sparc/machine.m4 \
x86/aes.asm x86/aes-encrypt.asm x86/aes-decrypt.asm \
x86/aes_tables.asm x86/arcfour-crypt.asm x86/sha1-compress.asm
DISTCLEANFILES = aes.asm aes.s \
aes-decrypt.asm aes-decrypt.s aes-encrypt.asm aes-encrypt.s \
arcfour-crypt.asm arcfour-crypt.s sha1-compress.asm sha1-compress.s \
machine.m4 nettle-types.h
CLEANFILES = $(SHLIBFORLINK)
clean-local:
rm -rf .lib
# Using assembler files. Should get precedence before the .c.o rule.
SUFFIXES = .asm .html
# can be overridden during development, eg. "make RM_TMP=: aes.o"
RM_TMP = rm -f
# FIXME: How to write this without using GNU make features?
# For now, use automake to disable these rules when they are not needed.
if ENABLE_ASSEMBLER
# NOTE: We have to use an explicit rule .asm -> .o, to override the .c
# -> .o rule. Using rules involving .s doesn't seem to work.
# %.s: %.asm asm.m4 machine.m4 config.m4
# $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
# `test -f $< || echo '$(srcdir)/'`$< >$@
# FIXME: For some reason, this rule breaks builds on Tru64 5.1B (on
# alpha), with the system make. It fails with "Don't know how to make
# aes.asm", which is very strange, since the make program on this
# system is not supposed to know about %-style pattern rules, and
# "aes.asm" doesn't not occur explicitly in any target or dependency.
# NOTE: We create an empty .deps-file, to make the make/automake
# dependency tracking happier.
%.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
$(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
`test -f $< || echo '$(srcdir)/'`$< >$*.s
$(COMPILE) -c $*.s -o $@
echo >.deps/$*.Po
# Assembler files must contain only PIC-clean code.
%_p.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
$(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
`test -f $< || echo '$(srcdir)/'`$< >$*.s
$(COMPILE) -c $*.s -o $@
echo >.deps/$*.Po
endif
if ENABLE_SHARED
# FIXME: This rule doesn't get dependencies right.
%_p.$(OBJEXT): %.c
$(COMPILE) $(SHLIBCFLAGS) -c $< -o $@
SHLIBOBJECTS = $(patsubst %.c,%_p.$(OBJEXT),$(libnettle_a_SOURCES)) \
$(patsubst %.$(OBJEXT),%_p.$(OBJEXT),$(LIBOBJS))
# The point of the sym links is to use -Lnettle-dir at linktime,
# and LD_LIBRARY_PATH=nettle-dir/.lib at run time.
$(SHLIBFORLINK): $(SHLIBOBJECTS)
$(SHLIBLINK) $^ -o $@ $(SHLIBLIBS)
-mkdir .lib 2>/dev/null
[ -z "$(SHLIBSONAME)" ] || (cd .lib \
&& ln -sf ../$(SHLIBFORLINK) $(SHLIBSONAME))
endif
# Shared library rules
all-local: $(SHLIBTARGET)
install-data-local: $(SHLIBINSTALL)
install-shared: $(SHLIBFORLINK)
$(INSTALL_DATA) $(SHLIBFORLINK) $(DESTDIR)$(libdir)/$(SHLIBFILE)
[ -z "$(SHLIBSONAME)" ] \
|| (cd $(DESTDIR)$(libdir) \
&& ln -sf $(SHLIBFILE) $(SHLIBSONAME) \
&& ln -sf $(SHLIBFILE) $(SHLIBFORLINK) )
.texinfo.html:
(cd $(srcdir) \
&& $(MAKEINFO) --html --no-split --output $@T $(<F) \
; test -s $@T && mv -f $@T $@)
# desCore rules
# It seems using $(srcdir)/ doesn't work with GNU make 3.79.1
# des_headers = $(srcdir)/parity.h $(srcdir)/rotors.h $(srcdir)/keymap.h
des_headers = parity.h rotors.h keymap.h
# Generate DES headers.
$(des_headers): desdata.c
$(MAKE) desdata$(EXEEXT)
./desdata$(EXEEXT) $(@F) > $@T
test -s $@T && mv -f $@T $@
des.o: des.c des.h $(des_headers)
# $Id$
#
# Makefile for low-level crypto library
CC=@CC@
CPP=@CPP@
RANLIB=@RANLIB@
AR=ar
# Reset VPATH
SRCDIR=@srcdir@
VPATH=$(SRCDIR):$(EXTRA_VPATH)
# The flags to generate a shared library
CPPFLAGS=$(PREFLAGS) $(DEFS) $(EXTRA_CPPFLAGS)
LDFLAGS=@LDFLAGS@
default: algorithms.a
### Magic Makefile for descore
# Interesting defines are sparc, mc68000, vax and i386
# Rely on gcc defining them appropriately.
# CPPFLAGS= -Dsparc # use 6+8 general regs
# CPPFLAGS= -Dmc68000 # use 3+4 addr (1+4 live), and 3+3 data regs
# CPPFLAGS= -Dvax # use 6+0 general regs
# CPPFLAGS= -Di386 # use 3+0 regs, and 3+0 normal variables
CODEGEN.c= $(CC) $(CFLAGS) $(CPPFLAGS) -S
COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) -c
LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
# hand-entered files that go into the library
SC= desKerb.c desUtil.c desQuick.c
SO= desKerb.o desUtil.o desQuick.o
# special generated files
GH= parity.h rotors.h keymap.h
GC= desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c
GI= desSmallFips.i desSmallCore.i desQuickFips.i desQuickCore.i
GO= desSmallFips.o desSmallCore.o desQuickFips.o desQuickCore.o
O= $(SO) $(GO)
# prefer compilation from .i if .i exists
#.SUFFIXES:
#.SUFFIXES: .i .o .c $(SUFFIXES)
desTest: desCore.a desTest.o
$(LINK.c) -o $@ desTest.o desCore.a
./desTest
# test all performance enhancement flags
sure:
make clean ; make desTest 'CPPFLAGS=-Di386 -Umc68000 -Usparc'
make clean ; make desTest 'CPPFLAGS=-Dvax -Umc68000 -Usparc'
make clean ; make desTest 'CPPFLAGS=-Dmc68000 -Usparc'
make clean ; make desTest 'CPPFLAGS=-Dsparc -Umc68000'
make clean ; make desTest
clean:
-rm -f *.o *.i *.x *.a ./desTest
-rm -f $(GC) $(GH) desdata
depend:
desCore.a: $O
$(AR) cru $@ $O
$(RANLIB) $@
desdata.o: desinfo.h $(SRCDIR)/../include/des.h
desUtil.o: $(GH)
$(SO): $(SRCDIR)/../include/des.h
$(GI): desCode.h $(SRCDIR)/../include/des.h Makefile
desTest.o: $(SRCDIR)/../include/des.h
$(GH): desdata
./desdata $@ > $@
desdata: desdata.o
$(LINK.c) -o $@ desdata.o
# new rules (note: tr|sed|tr is NOT necessary, just there so .i is readable)
.c.i:
$(CPP) $(CFLAGS) $(CPPFLAGS) $< > $*.x
@tr ';'\\012 \\012';' < $*.x | \
sed -e 's/[ ][ ]*/ /g' \
-e 's/^ //' \
-e 's/ $$//' \
-e '/^$$/d' \
-e '/^[^;]/s/^/;/' \
-e 's/#[^;]*;//g' \
-e 's/\([){]\) *\(register\)/\1;\2/g' \
-e 's/\([[(]\) /\1/g' \
-e 's/ \([])]\)/\1/g' \
-e 's/\([^]+0123 ]\) =/\1 =/g' \
-e 's/}/};;/g' \
-e 's/ *; */;/g' \
-e 's/;;;*/;;/g' \
-e '1s/^;*//' | \
tr ';'\\012 \\012';' > $@
@echo "" >> $@
# @echo "}" >> $@ # last definition must be a procedure
# -e 's/\(;[kmxyz][0-9]*\)\([^;]*=\)/\1 \2/g'
.i.o:
$(CODEGEN.c) $<
$(COMPILE.c) $*.s
# slowest to quickest
desSmallFips.c:
@echo '#include "desCode.h"' > $@
@echo \
'ENCRYPT(DesSmallFipsEncrypt,TEMPSMALL,LOADFIPS,KEYMAPSMALL,SAVEFIPS)' >> $@
@echo \
'DECRYPT(DesSmallFipsDecrypt,TEMPSMALL,LOADFIPS,KEYMAPSMALL,SAVEFIPS)' >> $@
desSmallCore.c:
@echo '#include "desCode.h"' > $@
@echo \
'ENCRYPT(DesSmallCoreEncrypt,TEMPSMALL,LOADCORE,KEYMAPSMALL,SAVECORE)' >> $@
@echo \
'DECRYPT(DesSmallCoreDecrypt,TEMPSMALL,LOADCORE,KEYMAPSMALL,SAVECORE)' >> $@
desQuickFips.c:
@echo '#include "desCode.h"' > $@
@echo \
'ENCRYPT(DesQuickFipsEncrypt,TEMPQUICK,LOADFIPS,KEYMAPQUICK,SAVEFIPS)' >> $@
@echo \
'DECRYPT(DesQuickFipsDecrypt,TEMPQUICK,LOADFIPS,KEYMAPQUICK,SAVEFIPS)' >> $@
desQuickCore.c:
@echo '#include "desCode.h"' > $@
@echo \
'ENCRYPT(DesQuickCoreEncrypt,TEMPQUICK,LOADCORE,KEYMAPQUICK,SAVECORE)' >> $@
@echo \
'DECRYPT(DesQuickCoreDecrypt,TEMPQUICK,LOADCORE,KEYMAPQUICK,SAVECORE)' >> $@
### End of rules for desCore
SRCS = sha.c md5.c idea.c rc4.c cast.c $(SC) $(GC)
OBJS = $(SRCS:.c=.o)
algorithms.a: $(OBJS)
rm -f algorithms.a
$(AR) cru algorithms.a $(OBJS)
$(RANLIB) algorithms.a
#### Remaking the Makefile and configure scripts. ####
#${srcdir}/configure: configure.in aclocal.m4
${srcdir}/configure: configure.in
cd ${srcdir} && autoconf
# autoheader might not change config.h.in, so touch a stamp file.
${srcdir}/config.h.in: stamp-h.in
#${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h \
# config.h.top config.h.bot
${srcdir}/stamp-h.in: configure.in
cd ${srcdir} && autoheader
echo timestamp > ${srcdir}/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
%.d: %.c
$(SHELL) -ec '$(CC) -MM -MG $(CPPFLAGS) $(DEFS) $< \
| sed '\''s/\($*\)\.o:/\1\.o $@ : /g'\'' > $@'
include $(SRCS:.c=.d)
# Nettle Makefile
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
LIBOBJS = @LIBOBJS@
SUBDIRS = tools testsuite examples
include config.make
TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) shadata$(EXEEXT) libnettle.a $(SHLIBTARGET)
all check install uninstall clean distclean mostlyclean maintainer-clean distdir:
$(MAKE) $@-here
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
check-here:
true
.SUFFIXES:
.SUFFIXES: .asm .html .c .dvi .info .$(OBJEXT) .p$(OBJEXT) .exe .pdf .ps .texinfo
all-here: $(TARGETS)
nettle_SOURCES = aes.c \
aes-decrypt-table.c aes-decrypt.c \
aes-encrypt-table.c aes-encrypt.c \
aes-set-encrypt-key.c aes-set-decrypt-key.c aes-meta.c \
arcfour.c arcfour-crypt.c arcfour-meta.c \
arctwo.c arctwo-meta.c \
base16-encode.c base16-decode.c base16-meta.c \
base64-encode.c base64-decode.c base64-meta.c \
cast128.c cast128-meta.c \
blowfish.c \
cbc.c \
des.c \
des3.c des-compat.c \
hmac.c hmac-md5.c hmac-sha1.c hmac-sha256.c \
knuth-lfib.c \
md2.c md2-meta.c md4.c md4-meta.c \
md5.c md5-compat.c md5-meta.c \
sha1.c sha1-compress.c sha1-meta.c sha256.c sha256-meta.c \
serpent.c serpent-meta.c \
twofish.c twofish-meta.c \
yarrow256.c yarrow_key_event.c \
sexp.c sexp-format.c \
sexp-transport.c sexp-transport-format.c \
bignum.c bignum-random.c sexp2bignum.c \
pkcs1.c pkcs1-rsa-md5.c pkcs1-rsa-sha1.c \
rsa.c rsa-sign.c rsa-verify.c \
rsa-md5-sign.c rsa-md5-verify.c \
rsa-sha1-sign.c rsa-sha1-verify.c \
rsa-encrypt.c rsa-decrypt.c \
rsa-keygen.c rsa-compat.c \
rsa2sexp.c sexp2rsa.c \
dsa.c dsa-sign.c dsa-verify.c dsa-keygen.c \
sexp2dsa.c \
pgp-encode.c rsa2openpgp.c \
buffer.c buffer-init.c realloc.c \
nettle-internal.c
HEADERS = aes.h arcfour.h arctwo.h bignum.h blowfish.h \
base16.h base64.h buffer.h cast128.h \
cbc.h \
des.h des-compat.h dsa.h \
hmac.h \
knuth-lfib.h \
macros.h \
md2.h md4.h \
md5.h md5-compat.h \
memxor.h \
nettle-meta.h \
pgp.h pkcs1.h realloc.h rsa.h rsa-compat.h \
sexp.h \
serpent.h sha.h twofish.h \
yarrow.h
INSTALL_HEADERS = $(HEADERS) nettle-types.h
SOURCES = $(nettle_SOURCES) aesdata.c desdata.c shadata.c
DISTFILES = $(SOURCES) $(HEADERS) .bootstrap aclocal.m4 configure.ac configure \
config.guess config.sub texinfo.tex \
config.h.in config.m4.in config.make.in Makefile.in \
README AUTHORS COPYING INSTALL NEWS TODO \
nettle.texinfo nettle.info sha-example.c
# Rules building libnettle.a
# FIXME: Do we really need to delete the archive first?
libnettle.a: $(nettle_SOURCES:.c=.o) $(LIBOBJS)
-rm -f $@
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) $@
.c.$(OBJEXT):
$(COMPILE) $(CCPIC_MAYBE) -c $< \
&& $(DEP_PROCESS)
# Rules building libnettle.so
$(SHLIBFORLINK): $(nettle_SOURCES:.c=.p$(OBJEXT)) $(LIBOBJS:.$(OBJEXT)=.p$(OBJEXT))
$(SHLIBLINK) $^ -o $@ $(SHLIBLIBS)
-mkdir .lib 2>/dev/null
[ -z "$(SHLIBSONAME)" ] || (cd .lib \
&& ln -sf ../$(SHLIBFORLINK) $(SHLIBSONAME))
.c.p$(OBJEXT):
$(COMPILE) $(SHLIBCFLAGS) -c $< -o $@ \
&& $(DEP_PROCESS)
.o$(EXEEXT):
$(LINK) $^ $(LIBS) -o $@
# aesdata.$(OBJEXT) : aesdata.c
# $(COMPILE) -c $< && $(DEP_PROCESS)
aesdata$(EXEEXT): aesdata.$(OBJEXT)
$(LINK) $^ $(LIBS) -o $@
# desdata.$(OBJEXT) : desdata.c
# $(COMPILE) -c $< && $(DEP_PROCESS)
desdata$(EXEEXT): desdata.$(OBJEXT)
$(LINK) $^ $(LIBS) -o $@
# shadata.$(OBJEXT) : shadata.c
# $(COMPILE) -c $< && $(DEP_PROCESS)
shadata$(EXEEXT): shadata.$(OBJEXT)
$(LINK) $^ $(LIBS) -lm -o $@
# FIXME: For some reason, this rule breaks builds on Tru64 5.1B (on
# alpha), with the system make. It fails with "Don't know how to make
# aes.asm", which is very strange, since the make program on this
# system is not supposed to know about %-style pattern rules, and
# "aes.asm" doesn't occur explicitly in any target or dependency.
@IF_ENABLE_ASM@%.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
@IF_ENABLE_ASM@ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
@IF_ENABLE_ASM@ `test -f $< || echo '$(srcdir)/'`$< >$*.s
@IF_ENABLE_ASM@ $(CC) $(CFLAGS) $(CCPIC_MAYBE) -c $*.s -o $@
@IF_ENABLE_ASM@ echo >$*.d
# All assembler files should use pic-code only.
@IF_ENABLE_ASM@%.p$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
@IF_ENABLE_ASM@ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
@IF_ENABLE_ASM@ `test -f $< || echo '$(srcdir)/'`$< >$*.s
@IF_ENABLE_ASM@ $(CC) $(CFLAGS) $(CCPIC) -c $*.s -o $@
@IF_ENABLE_ASM@ echo >$*.d
# Configure-related rules
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in config.status
$(SHELL) ./config.status $@
settings: $(srcdir)/settings.in config.status
$(SHELL) ./config.status $@
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in config.status
@rm -f stamp-h1
$(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(srcdir)/configure.ac
cd $(srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
# Installation
install-here: install-info libnettle.a $(SHLIBTARGET) $(INSTALL_HEADERS) $(SHLIBINSTALL)
$(INSTALL) -d $(includedir)/nettle
$(INSTALL) -d $(libdir)
$(INSTALL_DATA) $(INSTALL_HEADERS) $(includedir)/nettle
$(INSTALL_DATA) libnettle.a $(libdir)
install-shared: $(SHLIBFORLINK)
$(INSTALL) -d $(libdir)
$(INSTALL_DATA) $(SHLIBFORLINK) $(libdir)/$(SHLIBFILE)
[ -z "$(SHLIBSONAME)" ] \
|| (cd $(libdir) \
&& ln -sf $(SHLIBFILE) $(SHLIBSONAME) \
&& ln -sf $(SHLIBFILE) $(SHLIBFORLINK) )
install-info: nettle.info
$(INSTALL) -d $(infodir)
$(INSTALL_DATA) nettle.info $(infodir) ; \
if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
install-info --info-dir="$(infodir)" nettle.info ; \
else : ; fi
# Distribution
distdir = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
top_distdir = $(distdir)
# $(distdir) must always be a relative path!
distdir-here: $(DISTFILES)
rm -rf $(distdir)
mkdir $(distdir)
cp $(DISTFILES) $(distdir)
set -e; for d in $(SUBDIRS); do \
sd=$(distdir)/$$d ; \
mkdir $$sd && $(MAKE) -C $$d distdir=../$$sd $@ ; \
done
dist: distdir
tar cf - $(distdir) | gzip -c >$(distdir).tar.gz
rm -rf $(distdir)
rm_distcheck = test ! -d distcheck-tmp \
|| { find distcheck-tmp -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr distcheck-tmp; }; }
distcheck: dist
$(rm_distcheck)
mkdir distcheck-tmp
cd distcheck-tmp && gzip -d < $(distdir).tar.gz | tar xf - && chmod -R a-w $(distdir)
mkdir distcheck-tmp/build
mkdir distcheck-tmp/install
cd distcheck-tmp/build && ../$(distdir)/configure --prefix=`cd ../install && pwd`
cd distcheck-tmp/build && $(MAKE)
cd distcheck-tmp/build && $(MAKE) check
cd distcheck-tmp/build && $(MAKE) install
cd distcheck-tmp/build && $(MAKE) dist
cd distcheck-tmp/build && rm *.gz
cd distcheck-tmp/build && $(MAKE) distcleancheck
cd distcheck-tmp && find build -type f -print > leftover-files
@test `cat distcheck-tmp/leftover-files | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
cat distcheck-tmp/leftover-files ; \
exit 1; }
$(rm_distcheck)
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
clean-here:
rm -f $(TARGETS) *.$(OBJEXT) *.p$(OBJEXT) *.d
distclean-hdr:
-rm -f config.h stamp-h1
config.m4: config.status $(srcdir)/config.m4.in
$(SHELL) ./config.status $@
-include $(SOURCES:.c=.$(OBJEXT).d) $(SOURCES:.c=.p$(OBJEXT).d)
......@@ -2,14 +2,13 @@ dnl -*- mode: shell-script; sh-indentation: 2; -*-
dnl Process this file with autoconf to produce a configure script.
AC_INIT([nettle], [1.10])
AC_INIT([nettle], [1.11], [nettle-bugs@lists.lysator.liu.se])
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR([arcfour.c])
# Needed to stop autoconf from looking for files in parent directories.
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
AC_CONFIG_HEADER([config.h])
SHLIBMAJOR=2
SHLIBMINOR=2
......@@ -74,12 +73,15 @@ fi
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AM_PROG_CC_STDC
if test "x$am_cv_prog_cc_stdc" = xno ; then
if test "x$ac_cv_prog_cc_stdc" = xno ; then
AC_ERROR([the C compiler doesn't handle ANSI-C])
fi
AC_PROG_INSTALL
LSH_DEPENDENCY_TRACKING
# Select assembler code
asm_path=
case "$host" in
......@@ -146,12 +148,14 @@ else
SHLIBINSTALL=''
fi
if test "x$enable_pic" = xyes; then : ; else
CCPIC=''
if test "x$enable_pic" = xyes; then
CCPIC_MAYBE="$CCPIC"
else
CCPIC_MAYBE=''
fi
AC_SUBST([CCPIC_MAYBE])
AM_CONDITIONAL([ENABLE_ASSEMBLER], [test x$enable_assembler = xyes])
AM_CONDITIONAL([ENABLE_SHARED], [test x$enable_shared = xyes])
LSH_MAKE_CONDITIONAL([ENABLE_ASM], [test x$enable_assembler = xyes])
AC_SUBST(SHLIBCFLAGS)
AC_SUBST(SHLIBMAJOR)
......@@ -236,5 +240,5 @@ if test x$GCC = xyes ; then
# inttypes.h.
fi
AC_OUTPUT(Makefile tools/Makefile testsuite/Makefile examples/Makefile config.m4)