Index: ossp-pkg/uuid/ChangeLog RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/ChangeLog,v rcsdiff -q -kk '-r1.131' '-r1.132' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/ChangeLog,v' 2>/dev/null --- ChangeLog 2006/08/02 11:59:34 1.131 +++ ChangeLog 2006/08/02 13:11:09 1.132 @@ -13,7 +13,11 @@ Changes between 1.5.1 and 1.5.2 (31-Jul-2006 to xx-Aug-2006) - o Consistently include "config.h" in all source files. + o Optional DMALLOC based memory debugging support. + [Ralf S. Engelschall] + + o Consistently include "uuid_ac.h" in all source files to have GNU + autoconf results and standard system defines available everywhere. [Ralf S. Engelschall] Changes between 1.5.0 and 1.5.1 (28-Jul-2006 to 31-Jul-2006) Index: ossp-pkg/uuid/aclocal.m4 RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/aclocal.m4,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/aclocal.m4,v' 2>/dev/null --- aclocal.m4 2006/03/13 09:39:11 1.2 +++ aclocal.m4 2006/08/02 13:11:09 1.3 @@ -223,3 +223,130 @@ fi ]) +dnl ## +dnl ## Check for an external/extension library. +dnl ## - is aware of -config style scripts +dnl ## - searches under standard paths include, lib, etc. +dnl ## - searches under subareas like .libs, etc. +dnl ## +dnl ## configure.in: +dnl ## AC_CHECK_EXTLIB(, , ,
, +dnl ## [ [, ]]) +dnl ## Makefile.in: +dnl ## CFLAGS = @CFLAGS@ +dnl ## LDFLAGS = @LDFLAGS@ +dnl ## LIBS = @LIBS@ +dnl ## shell: +dnl ## $ ./configure --with-[=DIR] +dnl ## + +AC_DEFUN(AC_CHECK_EXTLIB,[dnl +AC_ARG_WITH($2, [dnl +[ --with-]m4_substr([$2[[=DIR]] ], 0, 19)[build with external $1 library (default=no)]], [dnl + if test ".$with_$2" = .yes; then + # via config script in PATH + $2_version=`($2-config --version) 2>/dev/null` + if test ".$$2_version" != .; then + CPPFLAGS="$CPPFLAGS `$2-config --cflags`" + CFLAGS="$CFLAGS `$2-config --cflags`" + LDFLAGS="$LDFLAGS `$2-config --ldflags`" + fi + else + if test -d "$with_$2"; then + found=0 + # via config script + for dir in $with_$2/bin $with_$2; do + if test -f "$dir/$2-config" && test ! -f "$dir/$2-config.in"; then + $2_version=`($dir/$2-config --version) 2>/dev/null` + if test ".$$2_version" != .; then + CPPFLAGS="$CPPFLAGS `$dir/$2-config --cflags`" + CFLAGS="$CFLAGS `$dir/$2-config --cflags`" + LDFLAGS="$LDFLAGS `$dir/$2-config --ldflags`" + found=1 + break + fi + fi + done + # in standard sub-areas + if test ".$found" = .0; then + for dir in $with_$2/include/$2 $with_$2/include $with_$2; do + if test -f "$dir/$4"; then + CPPFLAGS="$CPPFLAGS -I$dir" + CFLAGS="$CFLAGS -I$dir" + found=1 + break + fi + done + for dir in $with_$2/lib/$2 $with_$2/lib $with_$2; do + if test -f "$dir/lib$2.la" && test -d "$dir/.libs"; then + LDFLAGS="$LDFLAGS -L$dir -L$dir/.libs" + found=1 + break + elif test -f "$dir/lib$2.a" || test -f "$dir/lib$2.so"; then + LDFLAGS="$LDFLAGS -L$dir" + found=1 + break + fi + done + fi + # in any sub-area + if test ".$found" = .0; then +changequote(, )dnl + for file in x `find $with_$2 -name "$4" -type f -print`; do + test .$file = .x && continue + dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` + CPPFLAGS="$CPPFLAGS -I$dir" + CFLAGS="$CFLAGS -I$dir" + done + for file in x `find $with_$2 -name "lib$2.[aso]" -type f -print`; do + test .$file = .x && continue + dir=`echo $file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'` + LDFLAGS="$LDFLAGS -L$dir" + done +changequote([, ])dnl + fi + fi + fi + AC_HAVE_HEADERS($4) + AC_CHECK_LIB($2, $3) + with_$2=yes + ac_var="ac_cv_header_`echo $4 | sed 'y%./+-%__p_%'`" + eval "ac_val=\$$ac_var" + if test ".$ac_val" != .yes; then + with_$2=no + fi + if test ".$ac_cv_lib_$2_$3" != .yes; then + with_$2=no + fi + if test ".$with_$2" = .no; then + AC_ERROR([Unable to find $1 library]) + fi + ], [dnl +if test ".$with_$2" = .; then + with_$2=no +fi + ])dnl +AC_MSG_CHECKING(whether to build against external $1 library) +if test ".$with_$2" = .yes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +AC_MSG_RESULT([$with_$2]) +])dnl + +dnl ## +dnl ## Check whether to activate Dmalloc +dnl ## +dnl ## configure.in: +dnl ## AC_CHECK_DMALLOC +dnl ## + +AC_DEFUN(AC_CHECK_DMALLOC,[dnl +AC_CHECK_EXTLIB(Dmalloc, dmalloc, dmalloc_debug, dmalloc.h, + AC_DEFINE(WITH_DMALLOC, 1, [define if building with Dmalloc])) +if test ".$with_dmalloc" = .yes; then + CFLAGS=`echo "X$CFLAGS" | sed -e 's;^X;;' -e 's; -Wredundant-decls;;'` +fi +])dnl + Index: ossp-pkg/uuid/configure.ac RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/configure.ac,v rcsdiff -q -kk '-r1.11' '-r1.12' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/configure.ac,v' 2>/dev/null --- configure.ac 2006/01/13 06:44:30 1.11 +++ configure.ac 2006/08/02 13:11:09 1.12 @@ -41,6 +41,7 @@ AC_PROG_MAKE_SET AC_PROG_CC AC_CHECK_DEBUGGING +AC_CHECK_DMALLOC with_tags="" sinclude(libtool.m4) Index: ossp-pkg/uuid/devtool.conf RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/devtool.conf,v rcsdiff -q -kk '-r1.30' '-r1.31' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/devtool.conf,v' 2>/dev/null --- devtool.conf 2006/07/31 12:02:57 1.30 +++ devtool.conf 2006/08/02 13:11:09 1.31 @@ -13,10 +13,13 @@ @autoclean autoconf %configure + CPPFLAGS="-I/usr/opkg/include" \ + LDFLAGS="-L/usr/opkg/lib" \ ./configure \ --prefix=/tmp/uuid \ --disable-shared \ --enable-debug \ + --with-dmalloc \ --with-dce \ --with-cxx \ --with-perl \ Index: ossp-pkg/uuid/uuid.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.c,v rcsdiff -q -kk '-r1.61' '-r1.62' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid.c,v' 2>/dev/null --- uuid.c 2006/07/28 19:04:32 1.61 +++ uuid.c 2006/08/02 13:11:09 1.62 @@ -28,8 +28,8 @@ */ /* own headers (part 1/2) */ -#include "config.h" #include "uuid.h" +#include "uuid_ac.h" /* system headers */ #include Index: ossp-pkg/uuid/uuid_ac.h RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_ac.h,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_ac.h,v' 2>/dev/null --- uuid_ac.h 2006/01/13 06:44:30 1.5 +++ uuid_ac.h 2006/08/02 13:11:09 1.6 @@ -30,7 +30,20 @@ #ifndef __UUID_AC_H__ #define __UUID_AC_H__ -#include "config.h" +/* include GNU autoconf results */ +#include "config.h" /* HAVE_xxx */ + +/* include standard system headers */ +#include /* NULL, etc. */ +#include /* malloc, NULL, etc. */ +#include /* va_list, etc. */ +#include /* size_t, strlen, etc. */ +#include /* dmalloc pre-loading */ + +/* enable optional "dmalloc" support */ +#ifdef WITH_DMALLOC +#include /* malloc override, etc */ +#endif /* define boolean values */ #define UUID_FALSE 0 Index: ossp-pkg/uuid/uuid_cli.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_cli.c,v rcsdiff -q -kk '-r1.23' '-r1.24' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_cli.c,v' 2>/dev/null --- uuid_cli.c 2006/08/02 11:59:08 1.23 +++ uuid_cli.c 2006/08/02 13:11:09 1.24 @@ -27,9 +27,11 @@ ** uuid_cli.c: command line tool */ -#include "config.h" +/* own headers */ #include "uuid.h" +#include "uuid_ac.h" +/* system headers */ #include #include #include Index: ossp-pkg/uuid/uuid_dce.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_dce.c,v rcsdiff -q -kk '-r1.6' '-r1.7' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_dce.c,v' 2>/dev/null --- uuid_dce.c 2006/08/02 11:59:08 1.6 +++ uuid_dce.c 2006/08/02 13:11:09 1.7 @@ -41,7 +41,6 @@ #undef uuid_hash /* include regular API */ -#include "config.h" #include "uuid.h" /* helper macro */ Index: ossp-pkg/uuid/uuid_mac.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_mac.c,v rcsdiff -q -kk '-r1.10' '-r1.11' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_mac.c,v' 2>/dev/null --- uuid_mac.c 2006/07/28 19:04:32 1.10 +++ uuid_mac.c 2006/08/02 13:11:09 1.11 @@ -27,16 +27,16 @@ ** uuid_mac.c: Media Access Control (MAC) resolver implementation */ -#include "config.h" -#include "uuid_mac.h" +/* own headers (part (1/2) */ +#include "uuid_ac.h" +/* system headers */ #include #include #include #include #include #include - #ifdef HAVE_SYS_TIME_H #include #endif @@ -77,6 +77,9 @@ #include #endif +/* own headers (part (1/2) */ +#include "uuid_mac.h" + #ifndef FALSE #define FALSE 0 #endif Index: ossp-pkg/uuid/uuid_md5.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_md5.c,v rcsdiff -q -kk '-r1.14' '-r1.15' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_md5.c,v' 2>/dev/null --- uuid_md5.c 2006/07/28 19:16:03 1.14 +++ uuid_md5.c 2006/08/02 13:11:09 1.15 @@ -27,10 +27,14 @@ ** uuid_md5.c: MD5 API implementation */ +/* own headers (part 1/2) */ +#include "uuid_ac.h" + +/* system headers */ #include #include -#include "config.h" +/* own headers (part 2/2) */ #include "uuid_md5.h" /* Index: ossp-pkg/uuid/uuid_prng.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_prng.c,v rcsdiff -q -kk '-r1.13' '-r1.14' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_prng.c,v' 2>/dev/null --- uuid_prng.c 2006/08/02 11:59:08 1.13 +++ uuid_prng.c 2006/08/02 13:11:09 1.14 @@ -27,6 +27,10 @@ ** uuid_prng.c: PRNG API implementation */ +/* own headers (part 1/2) */ +#include "uuid_ac.h" + +/* system headers */ #include #include #include @@ -34,7 +38,7 @@ #include #include -#include "config.h" +/* own headers (part 2/2) */ #include "uuid_prng.h" #include "uuid_md5.h" Index: ossp-pkg/uuid/uuid_sha1.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_sha1.c,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_sha1.c,v' 2>/dev/null --- uuid_sha1.c 2006/07/28 19:16:05 1.4 +++ uuid_sha1.c 2006/08/02 13:11:10 1.5 @@ -27,10 +27,14 @@ ** uuid_sha1.c: SHA-1 API implementation */ +/* own headers (part 1/2) */ +#include "uuid_ac.h" + +/* system headers */ #include #include -#include "config.h" +/* own headers (part 2/2) */ #include "uuid_sha1.h" /* Index: ossp-pkg/uuid/uuid_str.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_str.c,v rcsdiff -q -kk '-r1.8' '-r1.9' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_str.c,v' 2>/dev/null --- uuid_str.c 2006/03/17 07:10:10 1.8 +++ uuid_str.c 2006/08/02 13:11:10 1.9 @@ -48,12 +48,16 @@ * o Ralf S. Engelschall (1999, for OSSP) */ +/* own headers (part 1/2) */ +#include "uuid_ac.h" + +/* system headers */ #include #include #include #include -#include "config.h" +/* own headers (part 2/2) */ #include "uuid_str.h" #if HAVE_LONG_LONG Index: ossp-pkg/uuid/uuid_ui128.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_ui128.c,v rcsdiff -q -kk '-r1.2' '-r1.3' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_ui128.c,v' 2>/dev/null --- uuid_ui128.c 2006/08/02 11:59:08 1.2 +++ uuid_ui128.c 2006/08/02 13:11:10 1.3 @@ -27,10 +27,14 @@ ** ui128.c: implementation of 128-bit unsigned integer arithmetic */ +/* own headers (part 1/2) */ +#include "uuid_ac.h" + +/* system headers */ #include #include -#include "config.h" +/* own headers (part 2/2) */ #include "uuid_ui128.h" #define UI128_BASE 256 /* 2^8 */ Index: ossp-pkg/uuid/uuid_ui64.c RCS File: /v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_ui64.c,v rcsdiff -q -kk '-r1.5' '-r1.6' -u '/v/ossp/cvs/ossp-pkg/uuid/Attic/uuid_ui64.c,v' 2>/dev/null --- uuid_ui64.c 2006/08/02 11:59:08 1.5 +++ uuid_ui64.c 2006/08/02 13:11:10 1.6 @@ -27,10 +27,14 @@ ** ui64.c: implementation of 64-bit unsigned integer arithmetic */ +/* own headers (part 1/2) */ +#include "uuid_ac.h" + +/* system headers */ #include #include -#include "config.h" +/* own headers (part 2/2) */ #include "uuid_ui64.h" #define UI64_BASE 256 /* 2^8 */