From 4c21c016c578ced9d612ea3040ea225e57c477ec Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 24 Jun 2010 17:51:19 +0000 Subject: configure.ac: make flex and bison required programs The build fails if these tools aren't available. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 8d3f308d7142..079521fe59be 100644 --- a/configure.ac +++ b/configure.ac @@ -155,8 +155,8 @@ NEED_PROG(patch, patch) AC_PATH_PROG(xmllint, xmllint, false) AC_PATH_PROG(xsltproc, xsltproc, false) AC_PATH_PROG(w3m, w3m, false) -AC_PATH_PROG(flex, flex, false) -AC_PATH_PROG(bison, bison, false) +NEED_PROG(flex, flex) +NEED_PROG(bison, bison) NEED_PROG(perl, perl) NEED_PROG(sed, sed) NEED_PROG(tar, tar) -- cgit 1.4.1 From d63375d52998e91c4d79563727baa29eb0753251 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 24 Jun 2010 17:51:24 +0000 Subject: configure.ac: Incredibly enough, tr(1) on Solaris doesn't understand A-Z syntax for ranges. --- configure.ac | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 079521fe59be..5af8aa58185b 100644 --- a/configure.ac +++ b/configure.ac @@ -10,8 +10,8 @@ AC_CANONICAL_HOST # Construct a Nix system name (like "i686-linux"). AC_MSG_CHECKING([for the canonical Nix system name]) -cpu_name=$(uname -p | tr 'A-Z ' 'a-z_') -machine_name=$(uname -m | tr 'A-Z ' 'a-z_') +cpu_name=$(uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ' 'abcdefghijklmnopqrstuvwxyz_') +machine_name=$(uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ' 'abcdefghijklmnopqrstuvwxyz_') case $machine_name in i*86) @@ -30,7 +30,7 @@ case $machine_name in ;; esac -sys_name=$(uname -s | tr 'A-Z ' 'a-z_') +sys_name=$(uname -s | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ ' 'abcdefghijklmnopqrstuvwxyz_') case $sys_name in cygwin*) -- cgit 1.4.1 From af09fe12ddf356d93855cfe7b84d607e3103103a Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 24 Jun 2010 17:51:31 +0000 Subject: Fix build of bsdiff-4.3 on machines that don't have , such as Solaris. --- configure.ac | 4 ++++ src/bsdiff-4.3/Makefile.am | 2 +- src/bsdiff-4.3/compat-include/err.h | 12 ++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/bsdiff-4.3/compat-include/err.h (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 5af8aa58185b..b21fd4480052 100644 --- a/configure.ac +++ b/configure.ac @@ -136,6 +136,10 @@ AC_CHECK_HEADERS([locale], [], [], []) AC_LANG_POP(C++) +# Check for . +AC_CHECK_HEADER([err.h], [], [bsddiff_compat_include="-Icompat-include"]) +AC_SUBST([bsddiff_compat_include]) + # Check whether we have the personality() syscall, which allows us to # do i686-linux builds on x86_64-linux machines. AC_CHECK_HEADERS([sys/personality.h]) diff --git a/src/bsdiff-4.3/Makefile.am b/src/bsdiff-4.3/Makefile.am index 4b3af0783708..953139f55962 100644 --- a/src/bsdiff-4.3/Makefile.am +++ b/src/bsdiff-4.3/Makefile.am @@ -8,4 +8,4 @@ bspatch_SOURCES = bspatch.c bspatch_LDADD = ${bzip2_lib} -AM_CFLAGS = -O3 ${bzip2_include} +AM_CFLAGS = -O3 ${bzip2_include} ${bsddiff_compat_include} diff --git a/src/bsdiff-4.3/compat-include/err.h b/src/bsdiff-4.3/compat-include/err.h new file mode 100644 index 000000000000..a851ded6f907 --- /dev/null +++ b/src/bsdiff-4.3/compat-include/err.h @@ -0,0 +1,12 @@ +/* Simulate BSD's functionality. */ + +#ifndef COMPAT_ERR_H_INCLUDED +#define COMPAT_ERR_H_INCLUDED 1 + +#include +#include + +#define err(rc,...) do { fprintf(stderr,__VA_ARGS__); exit(rc); } while(0) +#define errx(rc,...) do { fprintf(stderr,__VA_ARGS__); exit(rc); } while(0) + +#endif -- cgit 1.4.1 From a0d29040f79b365598fe75d01f72d29ab538206b Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 24 Jun 2010 22:22:24 +0000 Subject: Revert "configure.ac: make flex and bison required programs" This reverts commit 22405. Apparently, these programs aren't necessarily required when building from a release archive. --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b21fd4480052..94a92c7ce51b 100644 --- a/configure.ac +++ b/configure.ac @@ -159,8 +159,8 @@ NEED_PROG(patch, patch) AC_PATH_PROG(xmllint, xmllint, false) AC_PATH_PROG(xsltproc, xsltproc, false) AC_PATH_PROG(w3m, w3m, false) -NEED_PROG(flex, flex) -NEED_PROG(bison, bison) +AC_PATH_PROG(flex, flex, false) +AC_PATH_PROG(bison, bison, false) NEED_PROG(perl, perl) NEED_PROG(sed, sed) NEED_PROG(tar, tar) -- cgit 1.4.1