Remove several unused macro files
authorHugh McMaster <hugh.mcmaster@outlook.com>
Fri, 29 Mar 2019 10:35:50 +0000 (21:35 +1100)
committerDan Fandrich <dan@coneharvesters.com>
Tue, 9 Apr 2019 05:01:03 +0000 (07:01 +0200)
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
m4m/Makefile.am
m4m/gp-byteorder.m4 [deleted file]
m4m/gp-check-library.m4 [deleted file]
m4m/gp-check-popt.m4 [deleted file]
m4m/gp-packaging.m4 [deleted file]
m4m/gp-pkg-config.m4 [deleted file]
m4m/gp-references.m4 [deleted file]

index 297314a..525bdfd 100644 (file)
@@ -1 +1,6 @@
-EXTRA_DIST = gp-byteorder.m4 gp-check-library.m4 gp-check-popt.m4 gp-check-shell-environment.m4 gp-config-msg.m4 gp-documentation.m4 gp-gettext-hack.m4 gp-packaging.m4 gp-pkg-config.m4 gp-references.m4 stdint.m4
+EXTRA_DIST = \
+       gp-check-shell-environment.m4 \
+       gp-config-msg.m4 \
+       gp-documentation.m4 \
+       gp-gettext-hack.m4 \
+       stdint.m4
diff --git a/m4m/gp-byteorder.m4 b/m4m/gp-byteorder.m4
deleted file mode 100644 (file)
index 693f939..0000000
+++ /dev/null
@@ -1,354 +0,0 @@
-dnl AC_NEED_BYTEORDER_H ( HEADER-TO-GENERATE )
-dnl Copyright 2001-2002 by Dan Fandrich <dan@coneharvesters.com>
-dnl This file may be copied and used freely without restrictions.  No warranty
-dnl is expressed or implied.
-dnl
-dnl Create a header file that guarantees that byte swapping macros of the
-dnl ntohl variety as well as the extended types included in OpenBSD and
-dnl NetBSD such as le32toh are defined.  If possible, the standard ntohl
-dnl are overloaded as they are optimized for the given platform, but when
-dnl this is not possible (e.g. on a big-endian machine) they are defined
-dnl in this file.
-
-dnl Look for a symbol in a header file
-dnl AC_HAVE_SYMBOL ( IDENTIFIER, HEADER-FILE, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND )
-AC_DEFUN([AC_HAVE_SYMBOL],
-[
-AC_MSG_CHECKING(for $1 in $2)
-AC_EGREP_CPP([symbol is present|\<$1\>],[
-#include <$2>
-#ifdef $1
-       symbol is present
-#endif
-       ], 
-[AC_MSG_RESULT(yes)
-$3
-],
-[AC_MSG_RESULT(no)
-$4
-])])
-
-
-dnl Create a header file that defines extended byte swapping macros
-AC_DEFUN([AC_NEED_BYTEORDER_H],
-[
-changequote(, )dnl
-ac_dir=`echo $1|sed 's%/[^/][^/]*$%%'`
-changequote([, ])dnl
-if test "$ac_dir" != "$1" && test "$ac_dir" != .; then
-  # The file is in a subdirectory.
-  test ! -d "$ac_dir" && mkdir "$ac_dir"
-fi
-
-# We're only interested in the target CPU, but it's not always set
-effective_target="$target"
-if test "x$effective_target" = xNONE -o "x$effective_target" = x ; then
-       effective_target="$host"
-fi
-AC_SUBST(effective_target)
-
-cat > "$1" << EOF
-/* This file is generated automatically by configure */
-/* It is valid only for the system type ${effective_target} */
-
-#ifndef __BYTEORDER_H
-#define __BYTEORDER_H
-
-EOF
-
-dnl First, do an endian check
-AC_C_BIGENDIAN
-
-dnl Look for NetBSD-style extended byte swapping macros
-AC_HAVE_SYMBOL(le32toh,machine/endian.h,
- [HAVE_LE32TOH=1
- cat >> "$1" << EOF
-/* extended byte swapping macros are already available */
-#include <machine/endian.h>
-
-EOF],
-
-[
-
-dnl Look for standard byte swapping macros
-AC_HAVE_SYMBOL(ntohl,arpa/inet.h,
- [cat >> "$1" << EOF
-/* ntohl and relatives live here */
-#include <arpa/inet.h>
-
-EOF],
-
- [AC_HAVE_SYMBOL(ntohl,netinet/in.h,
-  [cat >> "$1" << EOF
-/* ntohl and relatives live here */
-#include <netinet/in.h>
-
-EOF],true)])
-])
-
-dnl Look for generic byte swapping macros
-
-dnl OpenBSD
-AC_HAVE_SYMBOL(swap32,machine/endian.h,
- [cat >> "$1" << EOF
-/* swap32 and swap16 are defined in machine/endian.h */
-
-EOF],
-
- [
-dnl Linux GLIBC
-  AC_HAVE_SYMBOL(bswap_32,byteswap.h,
-   [cat >> "$1" << EOF
-/* Define generic byte swapping functions */
-#include <byteswap.h>
-#define swap16(x) bswap_16(x)
-#define swap32(x) bswap_32(x)
-#define swap64(x) bswap_64(x)
-
-EOF],
-
-   [
-dnl NetBSD
-       AC_HAVE_SYMBOL(bswap32,machine/endian.h,
-    dnl We're already including machine/endian.h if this test succeeds
-        [cat >> "$1" << EOF
-/* Define generic byte swapping functions */
-EOF
-       if test "$HAVE_LE32TOH" != "1"; then
-               echo '#include <machine/endian.h>'>> "$1"
-       fi
-cat >> "$1" << EOF
-#define swap16(x) bswap16(x)
-#define swap32(x) bswap32(x)
-#define swap64(x) bswap64(x)
-
-EOF],
-
-   [
-dnl FreeBSD
-       AC_HAVE_SYMBOL(__byte_swap_long,sys/types.h,
-        [cat >> "$1" << EOF
-/* Define generic byte swapping functions */
-#include <sys/types.h>
-#define swap16(x) __byte_swap_word(x)
-#define swap32(x) __byte_swap_long(x)
-/* No optimized 64 bit byte swapping macro is available */
-#define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\
-                             ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\
-                             ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\
-                             ((uint64_t)(x) << 8)  & 0x000000ff00000000ULL | \\
-                             ((x) >> 8)  & 0x00000000ff000000ULL | \\
-                             ((x) >> 24) & 0x0000000000ff0000ULL | \\
-                             ((x) >> 40) & 0x000000000000ff00ULL | \\
-                             ((x) >> 56) & 0x00000000000000ffULL))
-
-EOF],
-
-        [
-dnl OS X
-       AC_HAVE_SYMBOL(NXSwapLong,machine/byte_order.h,
-        [cat >> "$1" << EOF
-/* Define generic byte swapping functions */
-#include <machine/byte_order.h>
-#define swap16(x) NXSwapShort(x)
-#define swap32(x) NXSwapLong(x)
-#define swap64(x) NXSwapLongLong(x)
-
-EOF],
-         [
-       if test $ac_cv_c_bigendian = yes; then
-               cat >> "$1" << EOF
-/* No other byte swapping functions are available on this big-endian system */
-#define swap16(x)      ((uint16_t)(((x) << 8) | ((uint16_t)(x) >> 8)))
-#define swap32(x)      ((uint32_t)(((uint32_t)(x) << 24) & 0xff000000UL | \\
-                                   ((uint32_t)(x) << 8)  & 0x00ff0000UL | \\
-                                   ((x) >> 8)  & 0x0000ff00UL | \\
-                                   ((x) >> 24) & 0x000000ffUL))
-#define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\
-                             ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\
-                             ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\
-                             ((uint64_t)(x) << 8)  & 0x000000ff00000000ULL | \\
-                             ((x) >> 8)  & 0x00000000ff000000ULL | \\
-                             ((x) >> 24) & 0x0000000000ff0000ULL | \\
-                             ((x) >> 40) & 0x000000000000ff00ULL | \\
-                             ((x) >> 56) & 0x00000000000000ffULL))
-
-EOF
-       else
- cat >> "$1" << EOF
-/* Use these as generic byteswapping macros on this little endian system */
-#define swap16(x)              ntohs(x)
-#define swap32(x)              ntohl(x)
-/* No optimized 64 bit byte swapping macro is available */
-#define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\
-                             ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\
-                             ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\
-                             ((uint64_t)(x) << 8)  & 0x000000ff00000000ULL | \\
-                             ((x) >> 8)  & 0x00000000ff000000ULL | \\
-                             ((x) >> 24) & 0x0000000000ff0000ULL | \\
-                             ((x) >> 40) & 0x000000000000ff00ULL | \\
-                             ((x) >> 56) & 0x00000000000000ffULL))
-
-EOF
-       fi
-])
-         ])
-    ])
-  ])
-])
-
-
-[
-if test "$HAVE_LE32TOH" != "1"; then
- cat >> "$1" << EOF
-/* The byte swapping macros have the form: */
-/*   EENN[a]toh or htoEENN[a] where EE is be (big endian) or */
-/* le (little-endian), NN is 16 or 32 (number of bits) and a, */
-/* if present, indicates that the endian side is a pointer to an */
-/* array of uint8_t bytes instead of an integer of the specified length. */
-/* h refers to the host's ordering method. */
-
-/* So, to convert a 32-bit integer stored in a buffer in little-endian */
-/* format into a uint32_t usable on this machine, you could use: */
-/*   uint32_t value = le32atoh(&buf[3]); */
-/* To put that value back into the buffer, you could use: */
-/*   htole32a(&buf[3], value); */
-
-/* Define aliases for the standard byte swapping macros */
-/* Arguments to these macros must be properly aligned on natural word */
-/* boundaries in order to work properly on all architectures */
-#define htobe16(x) htons(x)
-#define htobe32(x) htonl(x)
-#define be16toh(x) ntohs(x)
-#define be32toh(x) ntohl(x)
-
-#define HTOBE16(x) (x) = htobe16(x)
-#define HTOBE32(x) (x) = htobe32(x)
-#define BE32TOH(x) (x) = be32toh(x)
-#define BE16TOH(x) (x) = be16toh(x)
-
-EOF
-
- if test $ac_cv_c_bigendian = yes; then
-  cat >> "$1" << EOF
-/* Define our own extended byte swapping macros for big-endian machines */
-#define htole16(x)      swap16(x)
-#define htole32(x)      swap32(x)
-#define le16toh(x)      swap16(x)
-#define le32toh(x)      swap32(x)
-
-#define htobe64(x)      (x)
-#define be64toh(x)      (x)
-
-#define HTOLE16(x)      (x) = htole16(x)
-#define HTOLE32(x)      (x) = htole32(x)
-#define LE16TOH(x)      (x) = le16toh(x)
-#define LE32TOH(x)      (x) = le32toh(x)
-
-#define HTOBE64(x)      (void) (x)
-#define BE64TOH(x)      (void) (x)
-
-EOF
- else
-  cat >> "$1" << EOF
-/* On little endian machines, these macros are null */
-#define htole16(x)      (x)
-#define htole32(x)      (x)
-#define htole64(x)      (x)
-#define le16toh(x)      (x)
-#define le32toh(x)      (x)
-#define le64toh(x)      (x)
-
-#define HTOLE16(x)      (void) (x)
-#define HTOLE32(x)      (void) (x)
-#define HTOLE64(x)      (void) (x)
-#define LE16TOH(x)      (void) (x)
-#define LE32TOH(x)      (void) (x)
-#define LE64TOH(x)      (void) (x)
-
-/* These don't have standard aliases */
-#define htobe64(x)      swap64(x)
-#define be64toh(x)      swap64(x)
-
-#define HTOBE64(x)      (x) = htobe64(x)
-#define BE64TOH(x)      (x) = be64toh(x)
-
-EOF
- fi
-fi
-
-cat >> "$1" << EOF
-/* Define the C99 standard length-specific integer types */
-#include <_stdint.h>
-
-EOF
-
-case "${effective_target}" in
- i[3456]86-*)
-  cat >> "$1" << EOF
-/* Here are some macros to create integers from a byte array */
-/* These are used to get and put integers from/into a uint8_t array */
-/* with a specific endianness.  This is the most portable way to generate */
-/* and read messages to a network or serial device.  Each member of a */
-/* packet structure must be handled separately. */
-
-/* The i386 and compatibles can handle unaligned memory access, */
-/* so use the optimized macros above to do this job */
-#define be16atoh(x)     be16toh(*(uint16_t*)(x))
-#define be32atoh(x)     be32toh(*(uint32_t*)(x))
-#define be64atoh(x)     be64toh(*(uint64_t*)(x))
-#define le16atoh(x)     le16toh(*(uint16_t*)(x))
-#define le32atoh(x)     le32toh(*(uint32_t*)(x))
-#define le64atoh(x)     le64toh(*(uint64_t*)(x))
-
-#define htobe16a(a,x)   *(uint16_t*)(a) = htobe16(x)
-#define htobe32a(a,x)   *(uint32_t*)(a) = htobe32(x)
-#define htobe64a(a,x)   *(uint64_t*)(a) = htobe64(x)
-#define htole16a(a,x)   *(uint16_t*)(a) = htole16(x)
-#define htole32a(a,x)   *(uint32_t*)(a) = htole32(x)
-#define htole64a(a,x)   *(uint64_t*)(a) = htole64(x)
-
-EOF
-  ;;
-
- *)
-  cat >> "$1" << EOF
-/* Here are some macros to create integers from a byte array */
-/* These are used to get and put integers from/into a uint8_t array */
-/* with a specific endianness.  This is the most portable way to generate */
-/* and read messages to a network or serial device.  Each member of a */
-/* packet structure must be handled separately. */
-
-/* Non-optimized but portable macros */
-#define be16atoh(x)     ((uint16_t)(((x)[0]<<8)|(x)[1]))
-#define be32atoh(x)     ((uint32_t)(((x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3]))
-#define be64atoh(x)     ((uint64_t)(((x)[0]<<56)|((x)[1]<<48)|((x)[2]<<40)| \\
-        ((x)[3]<<32)|((x)[4]<<24)|((x)[5]<<16)|((x)[6]<<8)|(x)[7]))
-#define le16atoh(x)     ((uint16_t)(((x)[1]<<8)|(x)[0]))
-#define le32atoh(x)     ((uint32_t)(((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
-#define le64atoh(x)     ((uint64_t)(((x)[7]<<56)|((x)[6]<<48)|((x)[5]<<40)| \\
-        ((x)[4]<<32)|((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
-
-#define htobe16a(a,x)   (a)[0]=(uint8_t)((x)>>8), (a)[1]=(uint8_t)(x)
-#define htobe32a(a,x)   (a)[0]=(uint8_t)((x)>>24), (a)[1]=(uint8_t)((x)>>16), \\
-        (a)[2]=(uint8_t)((x)>>8), (a)[3]=(uint8_t)(x)
-#define htobe64a(a,x)   (a)[0]=(uint8_t)((x)>>56), (a)[1]=(uint8_t)((x)>>48), \\
-        (a)[2]=(uint8_t)((x)>>40), (a)[3]=(uint8_t)((x)>>32), \\
-        (a)[4]=(uint8_t)((x)>>24), (a)[5]=(uint8_t)((x)>>16), \\
-        (a)[6]=(uint8_t)((x)>>8), (a)[7]=(uint8_t)(x)
-#define htole16a(a,x)   (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
-#define htole32a(a,x)   (a)[3]=(uint8_t)((x)>>24), (a)[2]=(uint8_t)((x)>>16), \\
-        (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
-#define htole64a(a,x)   (a)[7]=(uint8_t)((x)>>56), (a)[6]=(uint8_t)((x)>>48), \\
-        (a)[5]=(uint8_t)((x)>>40), (a)[4]=(uint8_t)((x)>>32), \\
-        (a)[3]=(uint8_t)((x)>>24), (a)[2]=(uint8_t)((x)>>16), \\
-        (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
-
-EOF
-  ;;
-esac
-]
-
-cat >> "$1" << EOF
-#endif /*__BYTEORDER_H*/
-EOF])
diff --git a/m4m/gp-check-library.m4 b/m4m/gp-check-library.m4
deleted file mode 100644 (file)
index dd3700a..0000000
+++ /dev/null
@@ -1,378 +0,0 @@
-dnl @synopsis GP_CHECK_LIBRARY([VARNAMEPART],[libname],[VERSION-REQUIREMENT],
-dnl                            [headername],[functionname],
-dnl                            [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND],
-dnl                            [OPTIONAL-REQUIRED-ETC],[WHERE-TO-GET-IT])
-dnl
-dnl Checks for the presence of a certain library.
-dnl
-dnl Parameters:
-dnl
-dnl    VARNAMEPART            partial variable name for variable definitions
-dnl    libname                name of library
-dnl    VERSION-REQUIREMENT    check for the version using pkg-config.
-dnl                           default: []
-dnl    headername             name of header file
-dnl                           default: []
-dnl    functionname           name of function name in library
-dnl                           default: []
-dnl    ACTION-IF-FOUND        shell action to execute if found
-dnl                           default: []
-dnl    ACTION-IF-NOT-FOUND    shell action to execute if not found
-dnl                           default: []
-dnl    OPTIONAL-REQUIRED-ETC  one of "mandatory", "default-on", "default-off"
-dnl                                  "disable-explicitly"
-dnl                           default: [mandatory]
-dnl    WHERE-TO-GET-IT        place where to find the library, e.g. a URL
-dnl                           default: []
-dnl
-dnl What the ACTION-IFs can do:
-dnl
-dnl   * change the variable have_[$1] to "yes" or "no" and thus change
-dnl     the outcome of the test
-dnl   * execute additional checks to define more specific variables, e.g.
-dnl     for different API versions
-dnl
-dnl What the OPTIONAL-REQUIRED-ETC options mean:
-dnl
-dnl   mandatory           Absolute requirement, cannot be disabled.
-dnl   default-on          If found, it is used. If not found, it is not used.
-dnl   default-off         In case of --with-libfoo, detect it. Without
-dnl                       --with-libfoo, do not look for and use it.
-dnl   disable-explicitly  Required by default, but can be disabled by
-dnl                       explicitly giving --without-libfoo.
-dnl
-dnl These results have happened after calling GP_CHECK_LIBRARY:
-dnl
-dnl    AM_CONDITIONAL([HAVE_VARPREFIX],[ if found ])
-dnl    AM_SUBST([have_VARPREFIX], [ "yes" if found, "no" if not found ])
-dnl    AM_SUBST([VARPREFIX_CFLAGS],[ -I, -D and stuff ])
-dnl    AM_SUBST([VARPREFIX_LIBS], [ /path/to/libname.la -L/path -lfoo ])
-dnl
-dnl Parameters to ./configure which influence the GP_CHECK_LIBRARY results:
-dnl
-dnl   * VARNAMEPART_LIBS=/foobar/arm-palmos/lib/libname.la
-dnl     VARNAMEPART_CFLAGS=-I/foobar/include
-dnl   * --without-libfoo
-dnl   * --with-libfoo=/usr/local
-dnl   * --with-libfoo-include-dir=/foobar/include
-dnl   * --with-libfoo-lib=/foobar/arm-palmos/lib
-dnl   * --with-libfoo=autodetect
-dnl
-dnl Examples:
-dnl    GP_CHECK_LIBRARY([LIBEXIF], [libexif])dnl
-dnl    GP_CHECK_LIBRARY([LIBEXIF], [libexif-gtk], [>= 0.3.3])dnl
-dnl                                  note the space! ^
-dnl
-dnl Possible enhancements:
-dnl
-dnl   * Derive VAR_PREFIX directly from libname
-dnl     This will change the calling conventions, so be aware of that.
-dnl   * Give names of a header file and function name and to a test
-dnl     compilation.
-dnl
-AC_DEFUN([_GP_CHECK_LIBRARY_SOEXT],[dnl
-AC_MSG_CHECKING([for dynamic library extension])
-soext=""
-case "$host" in
-       *linux*)        soext=".so" ;;
-       *sunos*)        soext=".so" ;;
-       *solaris*)      soext=".so" ;;
-       *bsd*)          soext=".so" ;;
-       *darwin*)       soext=".dylib" ;;
-       *w32*)          soext=".dll" ;;
-esac
-if test "x$soext" = "x"; then
-       soext=".so"
-       AC_MSG_RESULT([${soext}])
-       AC_MSG_WARN([
-Host system "${host}" not recognized, defaulting to "${soext}".
-])
-else
-       AC_MSG_RESULT([${soext}])
-fi
-])dnl
-dnl
-AC_DEFUN([_GP_CHECK_LIBRARY],[
-# ----------------------------------------------------------------------
-# [GP_CHECK_LIBRARY]([$1],[$2],[$3],
-#                    [$4],[$5],
-#                    [...],[...],[$8])
-m4_ifval([$9],[dnl
-# $9
-])dnl
-# ----------------------------------------------------------------------
-dnl
-AC_REQUIRE([GP_CONFIG_MSG])dnl
-AC_REQUIRE([GP_PKG_CONFIG])dnl
-AC_REQUIRE([_GP_CHECK_LIBRARY_SOEXT])dnl
-dnl Use _CFLAGS and _LIBS given to configure.
-dnl This makes it possible to set these vars in a configure script
-dnl and AC_CONFIG_SUBDIRS this configure.
-AC_ARG_VAR([$1][_CFLAGS], [CFLAGS for compiling with ][$2])dnl
-AC_ARG_VAR([$1][_LIBS],   [LIBS to add for linking against ][$2])dnl
-dnl
-AC_MSG_CHECKING([for ][$2][ to use])
-userdef_[$1]=no
-have_[$1]=no
-if test "x${[$1][_LIBS]}" = "x" && test "x${[$1][_CFLAGS]}" = "x"; then
-       dnl define --with/--without argument
-       m4_if([$8], [default-off],
-               [m4_pushdef([gp_lib_arg],[--without-][$2])dnl
-                       try_[$1]=no
-               ],
-               [m4_pushdef([gp_lib_arg],[--with-][$2])dnl
-                       try_[$1]=auto
-               ])dnl
-       AC_ARG_WITH([$2],[AS_HELP_STRING([gp_lib_arg][=PREFIX],[where to find ][$2][, "no" or "auto"])],[try_][$1][="$withval"])
-       if test "x${[try_][$1]}" = "xauto"; then [try_][$1]=autodetect; fi
-       AC_MSG_RESULT([${try_][$1][}])
-       m4_popdef([gp_lib_arg])dnl
-       if test "x${[try_][$1]}" = "xautodetect"; then
-               dnl OK, we have to autodetect.
-               dnl We start autodetection with the cleanest known method: pkg-config
-               if test "x${[have_][$1]}" = "xno"; then
-                       dnl we need that line break after the PKG_CHECK_MODULES
-                       m4_ifval([$3],
-                               [PKG_CHECK_MODULES([$1],[$2][ $3],[have_][$1][=yes],[:])],
-                               [PKG_CHECK_MODULES([$1],[$2],     [have_][$1][=yes],[:])]
-                       )
-               fi
-               dnl If pkg-config didn't find anything, try the libfoo-config program
-               dnl certain known libraries ship with.
-               if test "x${[have_][$1]}" = "xno"; then
-                       AC_MSG_WARN([The `$2' library could not be found using pkg-config.
-No version checks will be performed if it is found using any other method.])
-                       AC_MSG_CHECKING([$2][ config program])
-                       m4_pushdef([gp_lib_config],[m4_if([$2],[libusb],[libusb-config],
-                               [$2],[libgphoto2],[gphoto2-config],
-                               [$2],[libgphoto2_port],[gphoto2-port-config],
-                               [none])])dnl
-                       AC_MSG_RESULT([gp_lib_config])
-                       AC_PATH_PROG([$1][_CONFIG_PROG],[gp_lib_config])
-                       if test -n "${[$1][_CONFIG_PROG]}" &&
-                               test "${[$1][_CONFIG_PROG]}" != "none"; then
-                               AC_MSG_CHECKING([for ][$2][ parameters from ][gp_lib_config])
-                               [$1]_LIBS="$(${[$1][_CONFIG_PROG]} --libs || echo "*error*")"
-                               [$1]_CFLAGSS="$(${[$1][_CONFIG_PROG]} --cflags || echo "*error*")"
-                               if test "x${[$1]_LIBS}" = "*error*" || 
-                                       test "x${[$1]_CFLAGS}" = "*error*"; then
-                                       AC_MSG_RESULT([error])
-                               else
-                                       have_[$1]=yes
-                                       AC_MSG_RESULT([ok])
-                               fi
-                       fi
-                       m4_popdef([gp_lib_config])dnl
-               fi
-               dnl Neither pkg-config, nor the libfoo-config program have found anything.
-               dnl So let's just probe the system.
-               if test "x${[have_][$1]}" = "xno"; then
-                       ifs="$IFS"
-                       IFS=":" # FIXME: for W32 and OS/2 we may need ";" here
-                       for _libdir_ in \
-                               ${LD_LIBRARY_PATH} \
-                               "${libdir}" \
-                               "${prefix}/lib64" "${prefix}/lib" \
-                               /usr/lib64 /usr/lib \
-                               /usr/local/lib64 /usr/local/lib \
-                               /opt/lib64 /opt/lib
-                       do
-                               IFS="$ifs"
-                               for _soext_ in .la ${soext} .a; do
-                                       if test -f "${_libdir_}/[$2]${_soext_}"
-                                       then
-                                               if test "x${_soext_}" = "x.la" ||
-                                                  test "x${_soext_}" = "x.a"; then
-                                                       [$1]_LIBS="${_libdir_}/[$2]${_soext_}"
-                                               else
-                                                       [$1]_LIBS="-L${_libdir_} -l$(echo "$2" | sed 's/^lib//')"
-                                               fi
-                                               break
-                                       fi
-                               done
-                               if test "x${[$1][_LIBS]}" != "x"; then
-                                       break
-                               fi
-                       done
-                       IFS="$ifs"
-                       if test "x${[$1][_LIBS]}" != "x"; then
-                               have_[$1]=yes
-                       fi
-               fi
-       elif test "x${[try_][$1]}" = "xno"; then
-               :
-       else
-               [$1][_LIBS]="-L${[try_][$1]}/lib -l$(echo "$2" | sed 's/^lib//')"
-               [$1][_CFLAGS]="-I${[try_][$1]}/include"
-       fi
-elif test "x${[$1][_LIBS]}" != "x" && test "x${[$1][_CFLAGS]}" != "x"; then
-       AC_MSG_RESULT([user-defined])
-       userdef_[$1]=yes
-       have_[$1]=yes
-else
-       AC_MSG_RESULT([broken call])
-       AC_MSG_ERROR([
-* Fatal:
-* When calling configure for ${PACKAGE_TARNAME}
-*     ${PACKAGE_NAME}
-* either set both [$1][_LIBS] *and* [$1][_CFLAGS]
-* or neither.
-])
-fi
-dnl
-dnl ACTION-IF-FOUND
-dnl
-m4_ifval([$6],[dnl
-if test "x${[have_][$1]}" = "xyes"; then
-# ACTION-IF-FOUND
-$6
-fi
-])dnl
-dnl
-dnl ACTION-IF-NOT-FOUND
-dnl
-m4_ifval([$7],[dnl
-if test "x${[have_][$1]}" = "xno"; then
-# ACTION-IF-NOT-FOUND
-$7
-fi
-])dnl
-dnl
-dnl Run our own test compilation
-dnl
-m4_ifval([$4],[dnl
-if test "x${[have_][$1]}" = "xyes"; then
-dnl AC_MSG_CHECKING([whether ][$2][ test compile succeeds])
-dnl AC_MSG_RESULT([${[have_][$1]}])
-CPPFLAGS_save="$CPPFLAGS"
-CPPFLAGS="${[$1]_CFLAGS}"
-AC_CHECK_HEADER([$4],[have_][$1][=yes],[have_][$1][=no])
-CPPFLAGS="$CPPFLAGS_save"
-fi
-])dnl
-dnl
-dnl Run our own test link
-dnl    Does not work for libraries which be built after configure time,
-dnl    so we deactivate it for them (userdef_).
-dnl
-m4_ifval([$5],[dnl
-if test "x${[userdef_][$1]}" = "xno" && test "x${[have_][$1]}" = "xyes"; then
-       AC_MSG_CHECKING([for function ][$5][ in ][$2])
-       LIBS_save="$LIBS"
-       LIBS="${[$1]_LIBS}"
-       AC_TRY_LINK_FUNC([$5],[],[have_][$1][=no])
-       LIBS="$LIBS_save"
-       AC_MSG_RESULT([${[have_][$1]}])
-fi
-])dnl
-dnl
-dnl Abort configure script if mandatory, but not found
-dnl
-m4_if([$8],[mandatory],[
-if test "x${[have_][$1]}" = "xno"; then
-       AC_MSG_ERROR([
-PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
-[$1][_LIBS]=${[$1][_LIBS]}
-[$1][_CFLAGS]=${[$1][_CFLAGS]}
-
-* Fatal: ${PACKAGE_NAME} requires $2 to build.
-* 
-* Possible solutions:
-*   - set PKG_CONFIG_PATH to adequate value
-*   - call configure with [$1][_LIBS]=.. and [$1][_CFLAGS]=..
-*   - call configure with one of the --with-$2 parameters
-]m4_ifval([$9],[dnl
-*   - get $2 and install it
-],[dnl
-*   - get $2 and install it:
-      $9]))
-fi
-])dnl
-dnl
-dnl Abort configure script if not found and not explicitly disabled
-dnl
-m4_if([$8],[disable-explicitly],[
-if test "x${[try_][$1]}" != "xno" && test "x${[have_][$1]}" = "xno"; then
-        AC_MSG_ERROR([
-PKG_CONFIG_PATH=${PKG_CONFIG_PATH}
-[$1][_LIBS]=${[$1][_LIBS]}
-[$1][_CFLAGS]=${[$1][_CFLAGS]}
-
-* Fatal: ${PACKAGE_NAME} by default requires $2 to build.
-*        You must explicitly disable $2 to build ${PACKAGE_TARNAME} without it.
-* 
-* Possible solutions:
-*   - call configure with --with-$2=no or --without-$2
-*   - set PKG_CONFIG_PATH to adequate value
-*   - call configure with [$1][_LIBS]=.. and [$1][_CFLAGS]=..
-*   - call configure with one of the --with-$2 parameters
-]m4_ifval([$9],[dnl
-*   - get $2 and install it
-],[dnl
-*   - get $2 and install it:
-      $9]))
-fi
-])dnl
-AM_CONDITIONAL([HAVE_][$1], [test "x$have_[$1]" = "xyes"])
-if test "x$have_[$1]" = "xyes"; then
-       AC_DEFINE([HAVE_][$1], 1, [whether we compile with ][$2][ support])
-       GP_CONFIG_MSG([$2],[yes])dnl
-       AC_MSG_CHECKING([$2][ library flags])
-       AC_MSG_RESULT([${[$1][_LIBS]}])
-       AC_MSG_CHECKING([$2][ cpp flags])
-       AC_MSG_RESULT([${[$1][_CFLAGS]}])
-else
-       GP_CONFIG_MSG([$2],[no])dnl
-fi
-dnl AC_SUBST is done implicitly by AC_ARG_VAR above.
-dnl AC_SUBST([$1][_LIBS])
-dnl AC_SUBST([$1][_CFLAGS])
-])dnl
-dnl
-dnl ####################################################################
-dnl
-AC_DEFUN([_GP_CHECK_LIBRARY_SYNTAX_ERROR],[dnl
-m4_errprint(__file__:__line__:[ Error:
-*** Calling $0 macro with old syntax
-*** Aborting.
-])dnl
-m4_exit(1)dnl
-])dnl
-dnl
-dnl ####################################################################
-dnl
-AC_DEFUN([GP_CHECK_LIBRARY],[dnl
-m4_if([$4], [mandatory],        [_GP_CHECK_LIBRARY_SYNTAX_ERROR($0)],
-      [$4], [default-enabled],  [_GP_CHECK_LIBRARY_SYNTAX_ERROR($0)],
-      [$4], [default-disabled], [_GP_CHECK_LIBRARY_SYNTAX_ERROR($0)])dnl
-m4_if([$8], [], [dnl
-      _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[mandatory],[$9])],
-      [$8], [default-on], [dnl
-      _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[$8],[$9])],
-      [$8], [disable-explicitly], [dnl
-      _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[$8],[$9])],
-      [$8], [default-off], [dnl
-      _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[$8],[$9])],
-      [$8], [mandatory], [dnl
-      _GP_CHECK_LIBRARY([$1],[$2],[$3],[$4],[$5],[$6],[$7],[$8],[$9])],
-      [m4_errprint(__file__:__line__:[ Error:
-Illegal argument 6 to $0: `$6'
-It must be one of "default-on", "default-off", "mandatory".
-])m4_exit(1)])dnl
-])dnl
-dnl
-m4_pattern_disallow([GP_CHECK_LIBRARY])
-m4_pattern_disallow([_GP_CHECK_LIBRARY])
-m4_pattern_disallow([_GP_CHECK_LIBRARY_SYNTAX_ERROR])
-m4_pattern_disallow([_GP_CHECK_LIBRARY_SOEXT])
-dnl
-dnl ####################################################################
-dnl
-dnl Please do not remove this:
-dnl filetype: 6e60b4f0-acb2-4cd5-8258-42014f92bd2c
-dnl I use this to find all the different instances of this file which 
-dnl are supposed to be synchronized.
-dnl
-dnl Local Variables:
-dnl mode: autoconf
-dnl End:
diff --git a/m4m/gp-check-popt.m4 b/m4m/gp-check-popt.m4
deleted file mode 100644 (file)
index 585bf21..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-dnl @synopsis GP_CHECK_POPT(FLAG)
-dnl
-dnl Check whether libpopt is available.
-dnl FLAG must be one of
-dnl    "mandatory"
-dnl    "default-enabled"
-dnl    "default-disabled"
-dnl
-AC_DEFUN([GP_CHECK_POPT],[
-#
-# [GP_CHECK_POPT]
-#
-AC_REQUIRE([GP_CONFIG_MSG])dnl
-m4_if([$1],[mandatory],        [_GP_CHECK_POPT([mandatory])],
-      [$1],[default-enabled],  [_GP_CHECK_POPT([disable])],
-      [$1],[default-disabled], [_GP_CHECK_POPT([enable])],
-      [m4_errprint(__file__:__line__:[ Error:
-Illegal argument to $0: `$1'
-Valid values are: mandatory, default-enabled, default-disabled
-])m4_exit(1)])dnl
-])dnl
-dnl
-AC_DEFUN([_GP_CHECK_POPT],[
-m4_if([$1],[mandatory],[
-try_popt=yes
-require_popt=yes
-],[
-try_popt=auto
-require_popt=no
-AC_ARG_ENABLE([popt],
-[AS_HELP_STRING([--$1-popt],[Do not use popt])],
-[ if   test "x$withval" = no \
-    || test "x$withval" = off \
-    || test "x$withval" = false; 
-  then
-    try_popt=no
-    require_popt=no
-  elif test "x$withval" = yes \
-    || test "x$withval" = on \
-    || test "x$withval" = true
-  then
-    try_popt=yes
-    require_popt=yes
-  fi
-])dnl
-])dnl
-
-AC_MSG_CHECKING([whether popt is required])
-AC_MSG_RESULT([${require_popt}])
-
-if test "$require_popt" != yes; then
-       AC_MSG_CHECKING([whether popt is requested])
-       AC_MSG_RESULT([${try_popt}])
-fi
-
-dnl Implicit AC_SUBST
-AC_ARG_VAR([POPT_CFLAGS],[CPPFLAGS to compile with libpopt])dnl
-AC_ARG_VAR([POPT_LIBS],[LDFLAGS to link with libpopt])dnl
-
-have_popt=no
-
-if test "x$POPT_CFLAGS" = "x" && test "x$POPT_LIBS" = "x"; then
-
-       # try to find options to compile popt.h
-       CPPFLAGS_save="$CPPFLAGS"
-       popth_found=no
-       for popt_prefix in "" /usr /usr/local
-       do
-               if test -n "${popt_prefix}"; then
-                       :
-               elif test -d "${popt_prefix}/include"; then
-                       CPPFLAGS="-I${popt_prefix}/include ${CPPFLAGS}"
-               else
-                       continue
-               fi
-               ac_cv_header_popt_h=""
-               unset ac_cv_header_popt_h
-               AC_CHECK_HEADER([popt.h], [popth_found=yes])
-               if test "$popth_found" = yes; then break; fi
-       done
-       CPPFLAGS="$CPPFLAGS_save"
-       if test "$popth_found" = "yes"; then
-               if test "$popt_prefix" = ""; then
-                       POPT_CFLAGS=""
-               else
-                       POPT_CFLAGS="-I${popt_prefix}/include"
-               fi
-       else
-               AC_MSG_ERROR([
-* Cannot autodetect popt.h
-*
-* Set POPT_CFLAGS and POPT_LIBS correctly.
-])
-       fi
-
-       # try to find options to link against popt
-       LDFLAGS_save="$LDFLAGS"
-       popt_links=no
-       for popt_prefix in /usr "" /usr/local; do
-               # We could have "/usr" and "lib64" at the beginning of the
-               # lists. Then the first tested location would
-               # incidentally be the right one on 64bit systems, and
-               # thus work around a bug in libtool on 32bit systems:
-               #
-               # 32bit libtool doesn't know about 64bit systems, and so the
-               # compilation will fail when linking a 32bit library from
-               # /usr/lib to a 64bit binary.
-               #
-               # This hack has been confirmed to workwith a
-               # 32bit Debian Sarge and 64bit Fedora Core 3 system.
-               for ldir in lib64 "" lib; do
-                       popt_libdir="${popt_prefix}/${ldir}"
-                       if test "${popt_libdir}" = "/"; then
-                               popt_libdir=""
-                       elif test -d "${popt_libdir}"; then
-                               LDFLAGS="-L${popt_libdir} ${LDFLAGS}"
-                       else
-                               continue
-                       fi
-                       # Avoid caching of results
-                       ac_cv_lib_popt_poptStuffArgs=""
-                       unset ac_cv_lib_popt_poptStuffArgs
-                       AC_CHECK_LIB([popt], [poptStuffArgs], [popt_links=yes])
-                       if test "$popt_links" = yes; then break; fi
-               done
-               if test "$popt_links" = yes; then break; fi
-       done
-       LDFLAGS="$LDFLAGS_save"
-       if test "$popt_links" = "yes"; then
-               if test "$popt_libdir" = ""; then
-                       POPT_LIBS="-lpopt"
-               else
-                       POPT_LIBS="-L${popt_libdir} -lpopt"
-               fi
-       else
-               AC_MSG_ERROR([
-* Cannot autodetect library directory containing popt
-*
-* Set POPT_CFLAGS and POPT_LIBS correctly.
-])
-       fi
-       have_popt=yes
-elif test "x$POPT_CFLAGS" != "x" && test "x$POPT_LIBS" != "x"; then
-    # just use the user specivied option
-    popt_msg="yes (user specified)"
-    have_popt=yes
-else
-       AC_MSG_ERROR([
-* Fatal: Either set both POPT_CFLAGS and POPT_LIBS or neither.
-])
-fi
-
-AC_MSG_CHECKING([if popt is functional])
-if test "$require_popt$have_popt" = "yesno"; then
-       AC_MSG_RESULT([no, but required])
-       AC_MSG_ERROR([
-* popt library not found
-* Fatal: ${PACKAGE_NAME} (${PACKAGE_TARNAME}) requires popt
-* Please install it and/or set POPT_CFLAGS and POPT_LIBS.
-])
-fi
-AC_MSG_RESULT([${have_popt}])
-
-GP_CONFIG_MSG([use popt library], [${have_popt}])
-if test "$have_popt" = "yes"; then
-       AC_DEFINE([HAVE_POPT],[1],[whether the popt library is available])
-       GP_CONFIG_MSG([popt libs],[${POPT_LIBS}])
-       GP_CONFIG_MSG([popt cppflags],[${POPT_CFLAGS}])
-fi
-AM_CONDITIONAL([HAVE_POPT],[test "$have_popt" = "yes"])
-])dnl
-dnl
-dnl Please do not remove this:
-dnl filetype: 7595380e-eff3-49e5-90ab-e40f1d544639
-dnl I use this to find all the different instances of this file which 
-dnl are supposed to be synchronized.
-dnl
-dnl Local Variables:
-dnl mode: autoconf
-dnl End:
diff --git a/m4m/gp-packaging.m4 b/m4m/gp-packaging.m4
deleted file mode 100644 (file)
index 163ece3..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-AC_DEFUN([GPKG_CHECK_RPM],
-[
-AC_ARG_WITH([rpmbuild],
-[AS_HELP_STRING([--with-rpmbuild=PATH],
-[Program to use for building RPMs])])
-
-if test -x "${with_rpmbuild}"
-then
-    RPMBUILD="${with_rpmbuild}"
-    AC_MSG_CHECKING([for rpmbuild or rpm])
-    AC_MSG_RESULT([${RPMBUILD} (from parameter)])
-else
-    AC_MSG_RESULT([using autodetection])
-    AC_CHECK_PROGS(RPMBUILD, [rpmbuild rpm], false)
-    AC_MSG_CHECKING([for rpmbuild or rpm])
-    AC_MSG_RESULT([${RPMBUILD} (autodetected)])
-fi
-AC_SUBST([RPMBUILD])
-AM_CONDITIONAL([ENABLE_RPM], [test "$RPMBUILD" != "false"])
-
-# whether libusb-devel is installed or not defines whether the RPM
-# packages we're going to build will depend on libusb and libusb-devel
-# RPM packages or not.
-AM_CONDITIONAL([RPM_LIBUSB_DEVEL], [rpm -q libusb-devel > /dev/null 2>&1])
-])
-
-AC_DEFUN([GPKG_CHECK_LINUX],
-[
-       # effective_target has to be determined in advance
-       AC_REQUIRE([AC_NEED_BYTEORDER_H])
-
-       is_linux=false
-       case "$effective_target" in 
-               *linux*)
-                       is_linux=true
-                       ;;
-       esac
-       AM_CONDITIONAL([HAVE_LINUX], ["$is_linux"])
-
-       # required for docdir
-       # FIXME: Implicit dependency
-       # AC_REQUIRE(GP_CHECK_DOC_DIR)
-
-       AC_ARG_WITH([hotplug-doc-dir],
-       [AS_HELP_STRING([--with-hotplug-doc-dir=PATH],
-       [Where to install hotplug scripts as docs [default=autodetect]])])
-
-       AC_MSG_CHECKING([for hotplug doc dir])
-       if test "x${with_hotplug_doc_dir}" != "x"
-       then # given as parameter
-           hotplugdocdir="${with_hotplug_doc_dir}"
-           AC_MSG_RESULT([${hotplugdocdir} (from parameter)])
-       else # start at docdir
-           hotplugdocdir="${docdir}/linux-hotplug"
-           AC_MSG_RESULT([${hotplugdocdir} (default)])
-       fi
-       AC_SUBST([hotplugdocdir])
-
-       AC_ARG_WITH([hotplug-usermap-dir],
-       [AS_HELP_STRING([--with-hotplug-usermap-dir=PATH],
-       [Where to install hotplug scripts as docs [default=autodetect]])])
-
-       AC_MSG_CHECKING([for hotplug usermap dir])
-       if test "x${with_hotplug_usermap_dir}" != "x"
-       then # given as parameter
-           hotplugusermapdir="${with_hotplug_usermap_dir}"
-           AC_MSG_RESULT([${hotplugusermapdir} (from parameter)])
-       else # start at docdir
-           hotplugusermapdir="${docdir}/linux-hotplug"
-           AC_MSG_RESULT([${hotplugusermapdir} (default)])
-       fi
-
-       AC_SUBST([hotplugusermapdir])
-])
diff --git a/m4m/gp-pkg-config.m4 b/m4m/gp-pkg-config.m4
deleted file mode 100644 (file)
index 531bfe4..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-dnl @synopsis GP_PKG_CONFIG
-dnl
-dnl If you want to set the PKG_CONFIG_PATH, best do so before
-dnl calling GP_PKG_CONFIG
-AC_DEFUN([GP_PKG_CONFIG],[
-#
-# [GP_PKG_CONFIG]
-#
-AC_ARG_VAR([PKG_CONFIG],[pkg-config package config utility])
-export PKG_CONFIG
-AC_ARG_VAR([PKG_CONFIG_PATH],[directory where pkg-config looks for *.pc files])
-export PKG_CONFIG_PATH
-
-AC_MSG_CHECKING([PKG_CONFIG_PATH])
-if test "x${PKG_CONFIG_PATH}" = "x"; then
-       AC_MSG_RESULT([empty])
-else
-       AC_MSG_RESULT([${PKG_CONFIG_PATH}])
-fi
-
-dnl AC_REQUIRE([PKG_CHECK_MODULES])
-AC_PATH_PROG([PKG_CONFIG],[pkg-config],[false])
-if test "$PKG_CONFIG" = "false"; then
-AC_MSG_ERROR([
-*** Build requires pkg-config
-***
-*** Possible solutions:
-***   - set PKG_CONFIG to where your pkg-config is located
-***   - set PATH to include the directory where pkg-config is installed
-***   - get it from http://freedesktop.org/software/pkgconfig/ and install it
-])
-fi
-])dnl
-
-dnl Please do not remove this:
-dnl filetype: d87b877b-80ec-447c-b042-21ec4a27c6f0
-dnl I use this to find all the different instances of this file which 
-dnl are supposed to be synchronized.
-
-dnl Local Variables:
-dnl mode: autoconf
-dnl End:
diff --git a/m4m/gp-references.m4 b/m4m/gp-references.m4
deleted file mode 100644 (file)
index fca98f1..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-dnl
-dnl Define external references
-dnl
-dnl Define once, use many times. 
-dnl No more URLs and Mail addresses in translated strings and stuff.
-dnl
-
-AC_DEFUN([GP_REF],[
-AC_SUBST([$1],["$2"])
-AC_DEFINE_UNQUOTED([$1],["$2"],[$3])
-])
-
-AC_DEFUN([GP_REFERENCES],
-[
-
-GP_REF(        [URL_GPHOTO_HOME], 
-       [http://www.gphoto.org/], 
-       [gphoto project home page])dnl
-
-GP_REF(        [URL_GPHOTO_PROJECT], 
-       [http://sourceforge.net/projects/gphoto], 
-       [gphoto sourceforge project page])
-
-GP_REF(        [URL_DIGICAM_LIST],
-       [http://www.teaser.fr/~hfiguiere/linux/digicam.html],
-       [camera list with support status])
-
-GP_REF(        [URL_JPHOTO_HOME],
-       [http://jphoto.sourceforge.net/],
-       [jphoto home page])
-
-GP_REF(        [URL_USB_MASSSTORAGE],
-       [http://www.linux-usb.org/USB-guide/x498.html],
-       [information about using USB mass storage])
-
-GP_REF(        [MAIL_GPHOTO_DEVEL],
-       [<gphoto-devel@lists.sourceforge.net>],
-       [gphoto development mailing list])
-
-GP_REF(        [MAIL_GPHOTO_USER],
-       [<gphoto-user@lists.sourceforge.net>],
-       [gphoto user mailing list])
-
-GP_REF(        [MAIL_GPHOTO_TRANSLATION],
-       [<gphoto-translation@lists.sourceforge.net>],
-       [gphoto translation mailing list])
-
-])