Fix creation of w32 npth-config tool.
authorWerner Koch <wk@gnupg.org>
Thu, 9 Jan 2014 16:41:16 +0000 (17:41 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 9 Jan 2014 16:46:56 +0000 (17:46 +0100)
* src/npth-config.in: Move to ../.
* src/npth.m4: Move to ../.
* w32/npth-config.in: Remove.
* w32/npth.m4: Remove.
* Makefile.am (EXTRA_DIST): Add npth-config.in and npth.m4.
(bin_SCRIPTS): new.
(m4datadir, m4data_DATA): New.
* configure.ac (AC_CONFIG_FILES): Adjust accordingly.

Makefile.am
configure.ac
npth-config.in [moved from src/npth-config.in with 100% similarity]
npth.m4 [moved from src/npth.m4 with 100% similarity]
src/Makefile.am
w32/Makefile.am
w32/npth-config.in [deleted file]
w32/npth.m4 [deleted file]

index ccea75d..24f5371 100644 (file)
 ACLOCAL_AMFLAGS = -I m4
 AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
 
-EXTRA_DIST = npth.spec.in autogen.sh HACKING
+EXTRA_DIST = npth-config.in npth.m4 npth.spec.in autogen.sh HACKING
+bin_SCRIPTS = npth-config
+m4datadir = $(datadir)/aclocal
+m4data_DATA = npth.m4
 
 if RUN_TESTS
 tests = tests
index cce73f5..0ce95ac 100644 (file)
@@ -335,8 +335,7 @@ src/npth.h
 src/Makefile
 w32/Makefile
 tests/Makefile])
-AC_CONFIG_FILES(src/npth-config, chmod +x src/npth-config)
-AC_CONFIG_FILES(w32/npth-config, chmod +x w32/npth-config)
+AC_CONFIG_FILES(npth-config, chmod +x npth-config)
 AC_OUTPUT
 
 echo "
similarity index 100%
rename from src/npth-config.in
rename to npth-config.in
similarity index 100%
rename from src/npth.m4
rename to npth.m4
index 6ce640a..59792d2 100644 (file)
 
 ## Process this file with automake to produce Makefile.in
 
-EXTRA_DIST = npth-config.in npth.m4 libnpth.vers
+EXTRA_DIST = libnpth.vers
 #           versioninfo.rc.in
-bin_SCRIPTS = npth-config
-m4datadir = $(datadir)/aclocal
-m4data_DATA = npth.m4
 nodist_include_HEADERS = npth.h
 
 lib_LTLIBRARIES = libnpth.la
index a483370..6401a45 100644 (file)
 
 ## Process this file with automake to produce Makefile.in
 
-EXTRA_DIST = npth-config.in npth.m4 npth.def
-bin_SCRIPTS = npth-config
-m4datadir = $(datadir)/aclocal
-m4data_DATA = npth.m4
+EXTRA_DIST = npth.def
 nodist_include_HEADERS = npth.h
 
 lib_LTLIBRARIES = libnpth.la
diff --git a/w32/npth-config.in b/w32/npth-config.in
deleted file mode 100644 (file)
index d9d512c..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This file is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-
-# Make sure that no weird locale setting messes up our sed regexps etc.
-LC_COLLATE=C
-LC_ALL=C
-LANG=C
-
-# NPTH's own cflags and libs
-cflags="-I@includedir@"
-libs="-L@libdir@"
-
-output=""
-
-usage()
-{
-    cat <<EOF
-Usage: npth-config [OPTIONS]
-Options:
-       [--thread={${thread_modules}}]
-       [--prefix]
-       [--exec-prefix]
-       [--version]
-        [--api-version]
-        [--host]
-       [--libs]
-       [--cflags]
-EOF
-    exit $1
-}
-
-if test $# -eq 0; then
-    usage 1 1>&2
-fi
-
-while test $# -gt 0; do
-    case "$1" in
-       -*=*)
-           optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
-           ;;
-       *)
-           optarg=
-           ;;
-    esac
-
-    case $1 in
-        --prefix=*)
-            # For compatibility reasons with old M4 macros, we ignore
-            # setting of prefix.
-            ;;
-        --prefix)
-           output="$output $prefix"
-           ;;
-        --exec-prefix=*)
-            ;;
-        --exec-prefix)
-           output="$output $exec_prefix"
-           ;;
-       --glib)
-           with_glib=yes
-           ;;
-        --version)
-            echo "@VERSION@"
-           exit 0
-           ;;
-        --api-version)
-           echo "@NPTH_CONFIG_API_VERSION@"
-           exit 0
-           ;;
-        --host)
-           echo "@NPTH_CONFIG_HOST@"
-           exit 0
-           ;;
-        --cflags)
-            result=
-            for i in $cflags ; do
-              skip=no
-              case $i in
-                  -I/usr/include|-I/include)
-                      skip=yes
-                      ;;
-                  -I*)
-                      for j in $result ; do
-                          if test x"$j" = x"$i" ; then
-                              skip=yes
-                              break;
-                          fi
-                      done
-                      ;;
-              esac
-              if test $skip = no ; then
-                  result="$result $i"
-              fi
-            done
-            output="$output $result"
-            ;;
-       --libs)
-            result=
-            for i in $libs; do
-              skip=no
-              case $i in
-                  -L/usr/lib|-L/lib)
-                      skip=yes
-                      ;;
-                  -L*|-l*)
-                      for j in $result ; do
-                          if test x"$j" = x"$i" ; then
-                              skip=yes
-                              break;
-                          fi
-                      done
-                      ;;
-              esac
-              if test $skip = no ; then
-                  result="$result $i"
-              fi
-            done
-            output="$output $result"
-           ;;
-       *)
-            usage 1 1>&2
-           ;;
-    esac
-    shift
-done
-
-echo $output
diff --git a/w32/npth.m4 b/w32/npth.m4
deleted file mode 100644 (file)
index 8058ba4..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# npth.m4 - autoconf macro to detect NPTH.
-# Copyright (C) 2002, 2003, 2004, 2011 g10 Code GmbH
-#
-# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# This file is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-AC_DEFUN([_AM_PATH_NPTH_CONFIG],
-[ AC_ARG_WITH(npth-prefix,
-            AC_HELP_STRING([--with-npth-prefix=PFX],
-                           [prefix where NPTH is installed (optional)]),
-     npth_config_prefix="$withval", npth_config_prefix="")
-  if test "x$npth_config_prefix" != x ; then
-      NPTH_CONFIG="$npth_config_prefix/bin/npth-config"
-  fi
-  AC_PATH_PROG(NPTH_CONFIG, npth-config, no)
-
-  if test "$NPTH_CONFIG" != "no" ; then
-    npth_version=`$NPTH_CONFIG --version`
-  fi
-  npth_version_major=`echo $npth_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
-  npth_version_minor=`echo $npth_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
-  npth_version_micro=`echo $npth_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
-])
-
-dnl AM_PATH_NPTH([MINIMUM-VERSION,
-dnl               [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for libnpth and define NPTH_CFLAGS and NPTH_LIBS.
-dnl
-AC_DEFUN([AM_PATH_NPTH],
-[ AC_REQUIRE([_AM_PATH_NPTH_CONFIG])dnl
-  tmp=ifelse([$1], ,1:0.4.2,$1)
-  if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-     req_npth_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
-     min_npth_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
-  else
-     req_npth_api=0
-     min_npth_version="$tmp"
-  fi
-
-  AC_MSG_CHECKING(for NPTH - version >= $min_npth_version)
-  ok=no
-  if test "$NPTH_CONFIG" != "no" ; then
-    req_major=`echo $min_npth_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
-    req_minor=`echo $min_npth_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-    req_micro=`echo $min_npth_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
-    if test "$npth_version_major" -gt "$req_major"; then
-        ok=yes
-    else
-        if test "$npth_version_major" -eq "$req_major"; then
-            if test "$npth_version_minor" -gt "$req_minor"; then
-               ok=yes
-            else
-               if test "$npth_version_minor" -eq "$req_minor"; then
-                   if test "$npth_version_micro" -ge "$req_micro"; then
-                     ok=yes
-                   fi
-               fi
-            fi
-        fi
-    fi
-  fi
-  if test $ok = yes; then
-     # If we have a recent NPTH, we should also check that the
-     # API is compatible.
-     if test "$req_npth_api" -gt 0 ; then
-        tmp=`$NPTH_CONFIG --api-version 2>/dev/null || echo 0`
-        if test "$tmp" -gt 0 ; then
-           if test "$req_npth_api" -ne "$tmp" ; then
-             ok=no
-           fi
-        fi
-     fi
-  fi
-  if test $ok = yes; then
-    NPTH_CFLAGS=`$NPTH_CONFIG --cflags`
-    NPTH_LIBS=`$NPTH_CONFIG --libs`
-    AC_MSG_RESULT(yes)
-    ifelse([$2], , :, [$2])
-  else
-    NPTH_CFLAGS=""
-    NPTH_LIBS=""
-    AC_MSG_RESULT(no)
-    ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(NPTH_CFLAGS)
-  AC_SUBST(NPTH_LIBS)
-])