diff --git a/bootstrap.sh b/bootstrap.sh index ec421c5..6391b75 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -8,7 +8,7 @@ else gnulibtool=gnulib-tool fi -gnulib_modules=( git-version-gen gitlog-to-changelog gnupload +gnulib_modules=( git-version-gen gitlog-to-changelog gnupload progname maintainer-makefile announce-gen crypto/md5 ) $gnulibtool --m4-base build-aux --source-base libgnu --import "${gnulib_modules[@]}" diff --git a/libargv/test.c b/libargv/test.c index 889ee3c..f8d173b 100644 --- a/libargv/test.c +++ b/libargv/test.c @@ -4,6 +4,7 @@ * $Date$ */ +#include #include "argv.h" int @@ -25,6 +26,8 @@ main(int argc, char ** argv) }; unsigned int i; + set_program_name(argv[0]); + /* Parse the command line. */ argv_help_string = "You need help with a test program?"; diff --git a/librfc822/Makefile.am b/librfc822/Makefile.am index a7425b9..2f101a4 100644 --- a/librfc822/Makefile.am +++ b/librfc822/Makefile.am @@ -5,12 +5,12 @@ AM_LFLAGS = -i noinst_LIBRARIES = librfc822.a noinst_HEADERS = rfc822.h -librfc822_a_SOURCES = \ - address.y address_scan.l address_sep.c decomment.c +librfc822_a_SOURCES = address.y address_scan.l address_sep.c decomment.c noinst_PROGRAMS = test test_SOURCES = test.c ../libmpools/mpools.c ../liblists/lists.c -test_LDADD = librfc822.a +test_CPPFLAGS = -I${srcdir}/../libgnu +test_LDADD = librfc822.a ../libgnu/libgnu.a EXTRA_DIST = testaddresslines parse_address.c diff --git a/librfc822/test.c b/librfc822/test.c index ff885c0..539d6e4 100644 --- a/librfc822/test.c +++ b/librfc822/test.c @@ -22,6 +22,7 @@ #ifdef DEBUG_DMALLOC # include #endif +#include #include "rfc822.h" @@ -36,6 +37,8 @@ main(int argc, char ** argv) * host; int rc; + set_program_name(argv[0]); + while(gets(buffer)) { printf("Read line: '%s'\n", buffer); diff --git a/main.c b/main.c index b7ac229..ba8246b 100644 --- a/main.c +++ b/main.c @@ -26,6 +26,7 @@ #include "libargv/argv.h" #include "libtext/text.h" #include "petidomo.h" +#include "progname.h" #ifndef LOG_PERROR # define LOG_PERROR 0 @@ -51,6 +52,8 @@ main(int argc, char * argv[]) {ARGV_LAST} }; + set_program_name(argv[0]); + /* Init logging routines first of all, so that we can report errors. */