diff options
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | Makefile.am | 62 | ||||
-rw-r--r-- | auto/Makefile.am | 8 | ||||
-rwxr-xr-x | autogen.sh | 4 | ||||
-rwxr-xr-x | configure.ac | 87 | ||||
-rw-r--r-- | system.h | 14 |
6 files changed, 104 insertions, 73 deletions
@@ -1,4 +1,6 @@ 1.17 -> 2.0: + - devzero2000: some minor fix to autofu and also a minor portability problem on AIX + with the native compiler - devzero2000: add malloc vodo to testit.sh - devzero2000: define build-gcov disabled by default - devzero2000: fix: make check work again diff --git a/Makefile.am b/Makefile.am index 0b3a15e..4afa610 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,9 +3,6 @@ ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I. -I$(top_srcdir) -LINT = splint -MCCABE = pmccabe - EXTRA_DIST = lookup3.c autogen.sh CHANGES \ footer_no_timestamp.html libpopt.vers \ $(TESTS) test-poptrc\ @@ -50,37 +47,36 @@ endif dist_man_MANS = popt.3 -BUILT_SOURCES = popt.pc # popt.lcd +BUILT_SOURCES = popt.pc distclean-local: - rm -rf .ccache - -.PHONY: updatepo -updatepo: - rsync -Lrtvz translationproject.org::tp/latest/popt/ po - -popt.lcd: Makefile.am ${libpopt_la_SOURCES} ${include_HEADERS} ${noinst_HEADERS} - lclint -dump $@ ${libpopt_la_SOURCES} + rm -rf .ccache -.PHONY: sources -sources: - @echo $(libpopt_la_SOURCES:%=popt/%) +clean-local: + rm -rf doxygen *.gcda *.gcno lcov-result if HAVE_SPLINT lint: - $(LINT) ${DEFS} ${INCLUDES} test1.c ${libpopt_la_SOURCES} -endif HAVE_SPLINT + $(SPLINT) ${DEFS} ${INCLUDES} test1.c ${libpopt_la_SOURCES} + +popt.lcd: Makefile.am ${libpopt_la_SOURCES} ${include_HEADERS} ${noinst_HEADERS} + $(SPLINT) -dump $@ ${libpopt_la_SOURCES} +endif +if HAVE_MCCABE mccabe: $(MCCABE) $(libpopt_la_SOURCES) | sort -n -r | head -n 10 +endif + if DOXYGEN_ENABLE doxygen: Doxyfile rm -rf doxygen mkdir -p doxygen - doxygen -endif DOXYGEN_ENABLE + $(DOXYGEN) +endif +if HAVE_LCOV # run lcov from scratch, always lcov-reset: make lcov-run @@ -98,10 +94,24 @@ lcov-run: # generate report based on current coverage data lcov-report: - mkdir lcov - lcov --directory . --capture --output-file lcov/lcov.info - lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove - lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info - rm lcov/remove - mv lcov/lcov.cleaned.info lcov/lcov.info - genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info + rm -rf lcov-result + mkdir lcov-result + $(LCOV) --directory . --capture --output-file lcov-result/lcov.info + $(LCOV) -l lcov-result/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov-result/remove + $(LCOV) -r lcov-result/lcov.info `cat lcov-result/remove` > lcov-result/lcov.cleaned.info + rm lcov-result/remove + mv lcov-result/lcov.cleaned.info lcov-result/lcov.info + genhtml -t "$(PACKAGE_STRING)" -o lcov lcov-result/lcov.info +endif + +.PHONY: updatepo +updatepo: + rsync -Lrtvz translationproject.org::tp/latest/popt/ po + po_dir=./po + LANG=C + ls "$po_dir"/*.po 2>/dev/null | sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" + +.PHONY: sources +sources: + @echo $(libpopt_la_SOURCES:%=popt/%) + diff --git a/auto/Makefile.am b/auto/Makefile.am index a771d7c..97a86ab 100644 --- a/auto/Makefile.am +++ b/auto/Makefile.am @@ -1,6 +1,4 @@ -AUTOTEST = api-sanity-autotest.pl - -TDIRS = descriptors_storage header_compile_errors test_results tests +TDIRS = descriptors_storage header_compile_errors test_results tests EXTRA_DIST = types @@ -9,6 +7,6 @@ clean-local: if HAVE_API_SANITY_AUTOTEST check-local: - -[ -d tests ] && ${AUTOTEST} -l popt -d desc -clean - -${AUTOTEST} -l popt -d desc -st types -gen -build -run + -[ -d tests ] && ${API_SANITY_AUTOTEST} -l popt -d desc -clean + -${API_SANITY_AUTOTEST} -l popt -d desc -st types -gen -build -run endif HAVE_API_SANITY_AUTOTEST @@ -12,3 +12,7 @@ find . -name "autom4te.cache" | xargs rm -rf [ ! -d m4 ] && mkdir m4 [ ! -d build-aux ] && mkdir build-aux autoreconf -vfi +po_dir=./po +LANG=C +ls "$po_dir"/*.po 2>/dev/null | + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" diff --git a/configure.ac b/configure.ac index 9384fcc..1e187e4 100755 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ([2.63]) +AC_PREREQ(2.63) AC_INIT([popt],[1.17.DEVEL],[popt-devel@rpm5.org]) AC_CONFIG_SRCDIR([lookup3.c]) @@ -13,10 +13,15 @@ AC_CONFIG_AUX_DIR([build-aux]) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([-Wall -Werror foreign]) # +# Checks for programs. +# Set common system defines for POSIX extensions, such as GNU_SOURCE +# Must be called before any macros that run the compiler (like AC-PROG-LIBTOOL) +AC_USE_SYSTEM_EXTENSIONS AM_GNU_GETTEXT_VERSION([0.17]) AM_GNU_GETTEXT([external]) AM_ICONV AM_MAINTAINER_MODE +# Libtool library interface versions # Library code modified: REVISION++ # Interfaces changed/added/removed: CURRENT++ REVISION=0 # Interfaces added: AGE++ @@ -25,38 +30,36 @@ AC_SUBST(LT_CURRENT, 0) AC_SUBST(LT_REVISION, 0) AC_SUBST(LT_AGE, 8) -ALL_LINGUAS="cs da de eo es fi fr ga gl hu id is it ja ko lv nb nl pl pt ro ru sk sl sv th tr uk vi wa zh_TW zh_CN" -CFLAGS="$CFLAGS -D_GNU_SOURCE -D_REENTRANT" +CFLAGS="$CFLAGS -D_REENTRANT" -# Checks for programs. AC_PROG_CC AC_PROG_CC_STDC AC_SYS_LARGEFILE AC_PROG_MAKE_SET AC_PROG_INSTALL -AC_PROG_LIBTOOL +LT_INIT + -# Checks for doxygen. -AC_PATH_PROG(DOXYGEN, doxygen, NO_DOXYGEN) +# Checks for doxygen support. +AC_PATH_PROG(DOXYGEN, doxygen, NO_DOXYGEN) AC_ARG_ENABLE(doxygen, - AS_HELP_STRING([--enable-doxygen],[enable doxygen API docs generation]), - DOXYGEN_ENABLE=$enableval, - [if test "$DOXYGEN" != NO_DOXYGEN; then - DOXYGEN_ENABLE=yes - else - DOXYGEN_ENABLE=no - fi] -) - -if test "$DOXYGEN_ENABLE" = "yes" && test "$DOXYGEN" = "NO_DOXYGEN"; then - AC_MSG_WARN([You have asked doxygen docs generation but doxygen isn't in the PATH]) -fi -if test "$DOXYGEN_ENABLE" = "no"; then - DOXYGEN=NO_DOXYGEN -fi + AS_HELP_STRING([--disable-doxygen],[disable doxygen API docs generation ]), + [DOXYGEN_ENABLE=$enableval, + if test x$DOXYGEN_ENABLE != xno + then + if test "$DOXYGEN" != NO_DOXYGEN + then + DOXYGEN_ENABLE=yes + else + DOXYGEN_ENABLE=no + AC_MSG_WARN([You have asked doxygen docs generation but doxygen isn't in the PATH]) + fi + fi], + [DOXYGEN_ENABLE=yes]) AM_CONDITIONAL([DOXYGEN_ENABLE], [test x$DOXYGEN != xNO_DOXYGEN]) +AM_COND_IF([DOXYGEN_ENABLE],[AC_SUBST([DOXYGEN],"$DOXYGEN")]) # Define for popt_sysconfig popt_sysconfdir="${sysconfdir}" @@ -65,40 +68,40 @@ AC_DEFINE_UNQUOTED([POPT_SYSCONFDIR], ["$popt_sysconfdir"], [Full path to defaul # Check for gcov support. # Check for lcov Makefile conditional +AC_PATH_PROG(LCOV,lcov, NO_LCOV) AC_ARG_ENABLE(build-gcov, - AS_HELP_STRING([--enable-build-gcov], [build POPT instrumented for gcov @<:@default=no@:>@. ]), + AS_HELP_STRING([--enable-build-gcov], [build POPT instrumented for gcov @<:@default=no@:>@.]), [enable_build_gcov=${enableval}], [enable_build_gcov=no]) AS_IF([test "x$enable_build_gcov" != xno], [ - if test "x$GCC" != x ; then + if test "x$GCC" != x + then CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" - AC_CHECK_PROG(HAVE_LCOV,lcov,"yes","no" ) - fi + else + LCOV=NO_LCOV + fi ]) - -AM_CONDITIONAL([HAVE_LCOV], [test x$LCOV != xno]) +AM_CONDITIONAL([HAVE_LCOV], [test x$LCOV != xNO_LCOV]) +AM_COND_IF([HAVE_LCOV],[AC_SUBST([LCOV],"$LCOV")]) # Check for api-sanity-autotest.pl Makefile conditional support for check-local -AC_CHECK_PROG(HAVE_API_SANITY_AUTOTEST,api-sanity-autotest.pl,"yes","no" ) - -AM_CONDITIONAL([HAVE_API_SANITY_AUTOTEST], [test x$HAVE_API_SANITY_AUTOTEST != xno]) - +AC_PATH_PROG(API_SANITY_AUTOTEST,api-sanity-autotest.pl,NO_API_SANITY_AUTOTEST) +AM_CONDITIONAL([HAVE_API_SANITY_AUTOTEST], [test "x$API_SANITY_AUTOTEST" != xNO_API_SANITY_AUTOTEST]) +AM_COND_IF([HAVE_API_SANITY_AUTOTEST],[AC_SUBST([API_SANITY_AUTOTEST],"$API_SANITY_AUTOTEST")]) # Check for splint Makefile conditional support -AC_CHECK_PROG(HAVE_SPLINT,splint,"yes","no" ) - -AM_CONDITIONAL([HAVE_SPLINT],[test x$HAVE_SPLINT != xno]) - -# Check for pmccabe Makefile conditional support -AC_CHECK_PROG(HAVE_MCCABE,pmccabe,"yes","no" ) - -AM_CONDITIONAL([HAVE_MCCABE],[test x$HAVE_MCCABE != xno]) - +AC_PATH_PROG(SPLINT,splint,NO_SPLINT) +AM_CONDITIONAL([HAVE_SPLINT],[test "x$SPLINT" != xNO_SPLINT]) +AM_COND_IF([HAVE_SPLINT],[AC_SUBST([SPLINT],"$SPLINT")]) +# Check for mccabe makefile conditional support +AC_PATH_PROG(MCCABE,pmccabe,NO_MCCABE) +AM_CONDITIONAL([HAVE_MCCABE],[test "x$MCCABE" != xNO_MCCABE]) +AM_COND_IF([HAVE_MCCABE],[AC_SUBST([MCCABE],"$MCCABE")]) # Checks for libraries. # Checks for header files. -AC_CHECK_HEADERS([assert.h fcntl.h float.h langinfo.h libintl.h limits.h sys/ioctl.h wchar.h]) +AC_CHECK_HEADERS([assert.h fcntl.h float.h langinfo.h libintl.h limits.h sys/ioctl.h wchar.h alloca.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE @@ -17,6 +17,20 @@ extern __const __int32_t *__ctype_toupper; #include <ctype.h> +#ifdef __GNUC__ +# undef alloca +# define alloca __builtin_alloca +#else +# ifdef HAVE_ALLOCA_H +# include <alloca.h> +# else +# ifndef _AIX +/* AIX alloca decl has to be the first thing in the file, bletch! */ +char *alloca (); +# endif +# endif +#endif + /* XXX isspace(3) has i18n encoding signednesss issues on Solaris. */ #define _isspaceptr(_chp) isspace((int)(*(unsigned char *)(_chp))) |