Re: [PATCH] aespipe - fix build issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

1. What you are doing with Makefile to remove escape is ugly! and
highly none standard.
2. I lost you... Can you please send full configure.ac and Makefile.in
3. Please don't strip in working directory, as subsequent make install
without strip will be affected.
4. I believe that users (including myself) expect that autoconf
packages will not require special targets to build and install.
"./configure && make install" should be sufficient and perform all
required detection. So extra effort should be invested n order to
detect optimization required. I can test for the assembly success if
you like.
5. I don't want to bother you anymore regarding automake... but it
will make the whole think much simpler.

Thank you,
Alon.

On 11/2/08, Jari Ruusu <jariruusu@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Jari Ruusu wrote:
>  > My current version is below. This patch does not include changes to
>  > generated ./configure script, so anyone applying this patch must also run
>  > autoconf command afterwards.
>
>
> New version below. I fixed some portability issues.
>
>
>  --
>  Jari Ruusu  1024R/3A220F51 5B 4B F9 BB D3 3F 52 E9  DB 1D EB E3 24 0E A9 DD
>
>
>  --- ../aespipe-v2.3e/Makefile.in        2007-02-18 11:26:23.000000000 +0200
>
> +++ ./Makefile.in       2008-11-02 10:35:46.000000000 +0200
>  @@ -1,16 +1,19 @@
>
>  #
>   #  Makefile.in
>   #
>  -#  Written by Jari Ruusu, February 18 2007
>  +#  Written by Jari Ruusu, November 2 2008
>   #
>  -#  Copyright 2002-2007 by Jari Ruusu.
>  +#  Copyright 2002-2008 by Jari Ruusu.
>   #  Redistribution of this file is permitted under the GNU Public License.
>   #
>
>  -CC = @CC@ @CFLAGS@ @DEFS@ -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
>  +CC = @CC@ @CPPFLAGS@ @CFLAGS@ @DEFS@
>   LINK = @CC@ @LDFLAGS@
>  +STRIP = @STRIP@
>   prefix = @prefix@
>   exec_prefix = @exec_prefix@
>
> +builddir = @builddir@
>  +datarootdir = @datarootdir@
>   @SET_MAKE@
>
>   aespipe: aespipe.o aes.o md5.o sha512.o rmd160.o
>
> @@ -19,24 +22,24 @@
>
>         $(LINK) -o aespipe aespipe.o aes-x86.o md5-x86.o sha512.o rmd160.o @LIBS@
>   amd64: aespipe.o aes-amd64.o md5-amd64.o sha512.o rmd160.o
>         $(LINK) -o aespipe aespipe.o aes-amd64.o md5-amd64.o sha512.o rmd160.o @LIBS@
>  -aespipe.o: aespipe.c aes.h md5.h sha512.h rmd160.h
>  -       $(CC) -o aespipe.o -c aespipe.c
>  -aes.o: aes.c aes.h
>  -       $(CC) -DCONFIGURE_DETECTS_BYTE_ORDER=1 -DDATA_ALWAYS_ALIGNED=1 -o aes.o -c aes.c
>  -aes-x86.o: aes-x86.S aes.h
>  -       $(CC) -o aes-x86.o -c aes-x86.S
>  -aes-amd64.o: aes-amd64.S aes.h
>  -       $(CC) -o aes-amd64.o -c aes-amd64.S
>  -md5.o: md5.c md5.h
>  -       $(CC) -o md5.o -c md5.c
>  -md5-x86.o: md5-x86.S md5.h
>  -       $(CC) -o md5-x86.o -c md5-x86.S
>  -md5-amd64.o: md5-amd64.S md5.h
>  -       $(CC) -o md5-amd64.o -c md5-amd64.S
>  -sha512.o: sha512.c sha512.h
>  -       $(CC) -o sha512.o -c sha512.c
>  -rmd160.o: rmd160.c rmd160.h
>  -       $(CC) -o rmd160.o -c rmd160.c
>  +aespipe.o: $(srcdir)/aespipe.c $(srcdir)/aes.h $(srcdir)/md5.h $(srcdir)/sha512.h $(srcdir)/rmd160.h
>  +       $(CC) -o aespipe.o -c $(srcdir)/aespipe.c
>  +aes.o: $(srcdir)/aes.c $(srcdir)/aes.h
>  +       $(CC) -DCONFIGURE_DETECTS_BYTE_ORDER=1 -DDATA_ALWAYS_ALIGNED=1 -o aes.o -c $(srcdir)/aes.c
>  +aes-x86.o: $(srcdir)/aes-x86.S $(srcdir)/aes.h
>  +       $(CC) -o aes-x86.o -c $(srcdir)/aes-x86.S
>  +aes-amd64.o: $(srcdir)/aes-amd64.S $(srcdir)/aes.h
>  +       $(CC) -o aes-amd64.o -c $(srcdir)/aes-amd64.S
>  +md5.o: $(srcdir)/md5.c $(srcdir)/md5.h
>  +       $(CC) -o md5.o -c $(srcdir)/md5.c
>  +md5-x86.o: $(srcdir)/md5-x86.S $(srcdir)/md5.h
>  +       $(CC) -o md5-x86.o -c $(srcdir)/md5-x86.S
>  +md5-amd64.o: $(srcdir)/md5-amd64.S $(srcdir)/md5.h
>  +       $(CC) -o md5-amd64.o -c $(srcdir)/md5-amd64.S
>  +sha512.o: $(srcdir)/sha512.c $(srcdir)/sha512.h
>  +       $(CC) -o sha512.o -c $(srcdir)/sha512.c
>  +rmd160.o: $(srcdir)/rmd160.c $(srcdir)/rmd160.h
>  +       $(CC) -o rmd160.o -c $(srcdir)/rmd160.c
>
>   clean:
>         rm -f *.o aespipe test-file[12345] config.log config.status configure.lineno
>
> @@ -45,12 +48,20 @@
>
>         rm -f Makefile
>
>   install:
>  -       mkdir -p @bindir@
>  -       rm -f @bindir@/aespipe
>  -       cp aespipe @bindir@/aespipe
>  -       mkdir -p @mandir@/man1
>  -       rm -f @mandir@/man1/aespipe.1
>  -       cp aespipe.1 @mandir@/man1/aespipe.1
>
> +       if ! test -f aespipe ; then $(MAKE) aespipe ; fi
>
> +       mkdir -p "$(DESTDIR)@bindir@"
>  +       rm -f "$(DESTDIR)@bindir@/aespipe"
>  +       cp aespipe "$(DESTDIR)@bindir@/aespipe"
>  +       chmod 0755 "$(DESTDIR)@bindir@/aespipe"
>  +       mkdir -p "$(DESTDIR)@mandir@/man1"
>  +       rm -f "$(DESTDIR)@mandir@/man1/aespipe.1"
>  +       cp $(srcdir)/aespipe.1 "$(DESTDIR)@mandir@/man1/aespipe.1"
>  +       chmod 0644 "$(DESTDIR)@mandir@/man1/aespipe.1"
>  +
>  +install-strip:
>
> +       if ! test -f aespipe ; then $(MAKE) aespipe ; fi
>
> +       $(STRIP) aespipe
>  +       $(MAKE) install
>
>   tests:
>         dd if=/dev/zero of=test-file1 bs=1024 count=33
>
> @@ -62,16 +73,17 @@
>
>         $(MAKE) test-part2 CT=AES256 HF=sha512 ITER=0  GK= MD=1bf92ee337b653cdb32838047dec00fc MD5WORK=test-part@MD5WORKPART@
>         $(MAKE) test-part2 CT=AES256 HF=rmd160 ITER=0  GK= MD=c85eb59da18876ae71ebd838675c6ef4 MD5WORK=test-part@MD5WORKPART@
>         $(MAKE) test-part2 CT=AES256 HF=sha512 ITER=10 GK= MD=dadad48a6d3d9b9914199626ed7b710c MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@rm -fr test-dir1
>         @GPGWORKPART@mkdir test-dir1
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES128 HF=sha256 ITER=0 GK="-K gpgkey1.asc -G test-dir1" MD=fa5c9a84bc8f6257830c3cbe60294c69 MD5WORK=test-part@MD5WORKPART@
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES192 HF=sha384 ITER=0 GK="-K gpgkey1.asc -G test-dir1" MD=ddec9544a36100156aef353ec2bf9740 MD5WORK=test-part@MD5WORKPART@
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES256 HF=sha512 ITER=0 GK="-K gpgkey1.asc -G test-dir1" MD=cb38b603f96f0deac1891d423983d69c MD5WORK=test-part@MD5WORKPART@
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES128 HF=sha256 ITER=0 GK="-K gpgkey2.asc -G test-dir1" MD=f9825b79873f5c439ae9371c1a929a6c MD5WORK=test-part@MD5WORKPART@
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES192 HF=sha384 ITER=0 GK="-K gpgkey2.asc -G test-dir1" MD=489991b779213f60219f09c575c08247 MD5WORK=test-part@MD5WORKPART@
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES256 HF=sha512 ITER=0 GK="-K gpgkey2.asc -G test-dir1" MD=2a1d0d3fce83fbe5f3edcca95fbab3b7 MD5WORK=test-part@MD5WORKPART@
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES128 HF=sha256 ITER=0 GK="-K gpgkey3.asc -G test-dir1" MD=fabe7422f534820838dfd4571ba14ade MD5WORK=test-part@MD5WORKPART@
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES192 HF=sha384 ITER=0 GK="-K gpgkey3.asc -G test-dir1" MD=3eadc976525f9df7e18d56676ec730c8 MD5WORK=test-part@MD5WORKPART@
>  -       @GPGWORKPART@$(MAKE) test-part2 CT=AES256 HF=sha512 ITER=0 GK="-K gpgkey3.asc -G test-dir1" MD=3be488a60dd77bcab9fbeba4a428c3d5 MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES128 HF=sha256 ITER=0 GK="-K $(srcdir)/gpgkey1.asc -G test-dir1" MD=fa5c9a84bc8f6257830c3cbe60294c69 MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES192 HF=sha384 ITER=0 GK="-K $(srcdir)/gpgkey1.asc -G test-dir1" MD=ddec9544a36100156aef353ec2bf9740 MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES256 HF=sha512 ITER=0 GK="-K $(srcdir)/gpgkey1.asc -G test-dir1" MD=cb38b603f96f0deac1891d423983d69c MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES128 HF=sha256 ITER=0 GK="-K $(srcdir)/gpgkey2.asc -G test-dir1" MD=f9825b79873f5c439ae9371c1a929a6c MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES192 HF=sha384 ITER=0 GK="-K $(srcdir)/gpgkey2.asc -G test-dir1" MD=489991b779213f60219f09c575c08247 MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES256 HF=sha512 ITER=0 GK="-K $(srcdir)/gpgkey2.asc -G test-dir1" MD=2a1d0d3fce83fbe5f3edcca95fbab3b7 MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES128 HF=sha256 ITER=0 GK="-K $(srcdir)/gpgkey3.asc -G test-dir1" MD=fabe7422f534820838dfd4571ba14ade MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES192 HF=sha384 ITER=0 GK="-K $(srcdir)/gpgkey3.asc -G test-dir1" MD=3eadc976525f9df7e18d56676ec730c8 MD5WORK=test-part@MD5WORKPART@
>  +       @GPGWORKPART@$(MAKE) test-part2 CT=AES256 HF=sha512 ITER=0 GK="-K $(srcdir)/gpgkey3.asc -G test-dir1" MD=3be488a60dd77bcab9fbeba4a428c3d5 MD5WORK=test-part@MD5WORKPART@
>         echo 1234567890123456789012345678901 >test-file4
>         $(MAKE) test-part2 CT=AES HF=unhashed1 ITER=0 GK= MD=293b09053055af7ca5235dc6a5bc0b74 MD5WORK=test-part@MD5WORKPART@
>         echo 12345678901234567890123456789012 >test-file4
>
> @@ -98,4 +110,4 @@
>
>         echo "NO MD5 TEST" >test-file2
>         echo "NO MD5 TEST" >test-file5
>
>  -.PHONY: aespipe x86 i586 amd64 clean distclean install tests test-part2 test-part3 test-part4 test-part5
>  +.PHONY: aespipe x86 i586 amd64 clean distclean install install-strip tests test-part2 test-part3 test-part4 test-part5
>  --- ../aespipe-v2.3e/configure.ac       2004-07-07 17:41:14.000000000 +0300
>
> +++ ./configure.ac      2008-11-02 10:35:46.000000000 +0200
>
> @@ -1,15 +1,18 @@
>   dnl
>   dnl  configure.ac
>   dnl
>  -dnl  Written by Jari Ruusu, July 7 2004
>  +dnl  Written by Jari Ruusu, November 2 2008
>   dnl
>  -dnl  Copyright 2002,2003,2004 by Jari Ruusu.
>  +dnl  Copyright 2002-2008 by Jari Ruusu.
>   dnl  Redistribution of this file is permitted under the GNU Public License.
>   dnl
>
>   AC_INIT(aespipe, 2)
>   AC_CONFIG_SRCDIR([aespipe.c])
>  +AC_GNU_SOURCE
>  +AC_SYS_LARGEFILE
>   AC_PROG_CC
>  +AC_CHECK_TOOL([STRIP],[strip])
>   AC_PROG_MAKE_SET
>   AC_CHECK_FUNCS(mlockall)
>   AC_HEADER_STDC
>  @@ -21,20 +24,20 @@
>   AC_TYPE_SIZE_T
>
>   dnl Check if parameter 1 exists as typedef or macro
>  -AC_DEFUN(AESPIPE_CHECK_TYPE,
>  +AC_DEFUN([AESPIPE_CHECK_TYPE],
>   [ AC_MSG_CHECKING(for $1 type)
>  -AC_CACHE_VAL(x_have_type_$1,
>  +AC_CACHE_VAL(x_cv_have_type_$1,
>   [AC_TRY_COMPILE([#define _GNU_SOURCE 1
>   #include <string.h>
>   #include <sys/types.h>], [
>   int a = sizeof($1);
>  -], x_have_type_$1=yes, x_have_type_$1=no )])
>  -AC_MSG_RESULT($x_have_type_$1)
>  +], x_cv_have_type_$1=yes, x_cv_have_type_$1=no )])
>  +AC_MSG_RESULT($x_cv_have_type_$1)
>   ])
>
>   dnl Make sure that u_int32_t is something sane
>   AESPIPE_CHECK_TYPE(u_int32_t)
>  -if test "$x_have_type_u_int32_t" = no; then
>  +if test "$x_cv_have_type_u_int32_t" = no; then
>    AC_CHECK_SIZEOF(unsigned int, 4)
>    if test "$ac_cv_sizeof_unsigned_int" = 4; then
>      AC_DEFINE(u_int32_t, unsigned int)
>  @@ -48,7 +51,7 @@
>
>   dnl Make sure that u_int64_t is something sane
>   AESPIPE_CHECK_TYPE(u_int64_t)
>  -if test "$x_have_type_u_int64_t" = no; then
>  +if test "$x_cv_have_type_u_int64_t" = no; then
>    AC_CHECK_SIZEOF(unsigned long, 4)
>    if test "$ac_cv_sizeof_unsigned_long" = 8; then
>      AC_DEFINE(u_int64_t, unsigned long)
>
> @@ -124,3 +127,8 @@
>
>
>   AC_CONFIG_FILES([Makefile])
>   AC_OUTPUT
>
> +
>  +dnl Add space escaped srcdir to Makefile
>  +echo "srcdir=$srcdir" | sed -e 's/ /\\ /g' >Makefile.ac-tmp-1
>  +cat Makefile >>Makefile.ac-tmp-1
>  +mv Makefile.ac-tmp-1 Makefile
>

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/


[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux