diff options
author | Neal Walfield <[email protected]> | 2003-02-18 20:01:22 +0000 |
---|---|---|
committer | Neal Walfield <[email protected]> | 2003-02-18 20:01:22 +0000 |
commit | c96af1616e441d0a65cebf06631ea84222c3df14 (patch) | |
tree | a25d9a1cb99b6580d3878ea78ca02523f38dc7db | |
parent | 2003-02-18 Neal H. Walfield <[email protected]> (diff) | |
download | libassuan-c96af1616e441d0a65cebf06631ea84222c3df14.tar.gz libassuan-c96af1616e441d0a65cebf06631ea84222c3df14.zip |
/
2003-02-18 Neal H. Walfield <[email protected]>
* configure.ac (AC_CONFIG_FILES): Add src/libassuan-config.
(LIBASSUAN_CONFIG_LIBS, LIBASSUAN_CONFIG_CFLAGS): New variables.
AC_SUBST them.
src/
2003-02-18 Neal H. Walfield <[email protected]>
* libassuan-config.in: New file.
* Makefile.am (bin_PROGRAMS): New variable.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/libassuan-config.in | 114 |
5 files changed, 134 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2003-02-18 Neal H. Walfield <[email protected]> + + * configure.ac (AC_CONFIG_FILES): Add src/libassuan-config. + (LIBASSUAN_CONFIG_LIBS, LIBASSUAN_CONFIG_CFLAGS): New variables. + AC_SUBST them. + 2003-02-17 Neal H. Walfield <[email protected]> * AUTHORS: New file. diff --git a/configure.ac b/configure.ac index f7735c5..a499407 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,13 @@ esac AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME", [A human readable text with the name of the OS]) +# For src/libassuan-config.in +LIBASSUAN_CONFIG_LIBS="-lassuan" +LIBASSUAN_CONFIG_CFLAGS="" +AC_SUBST(LIBASSUAN_CONFIG_LIBS) +AC_SUBST(LIBASSUAN_CONFIG_CFLAGS) + +AC_CONFIG_COMMANDS([assuan-defs],[chmod +x src/libassuan-config]) # Checks for header files. AC_HEADER_STDC @@ -130,6 +137,7 @@ AC_REPLACE_FUNCS(memrchr) AC_CONFIG_FILES([ Makefile src/Makefile +src/libassuan-config doc/Makefile tests/Makefile ]) diff --git a/src/ChangeLog b/src/ChangeLog index cf6aa19..06e331c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-02-18 Neal H. Walfield <[email protected]> + + * libassuan-config.in: New file. + * Makefile.am (bin_PROGRAMS): New variable. + 2003-02-17 Neal H. Walfield <[email protected]> * .cvsignore: New file. diff --git a/src/Makefile.am b/src/Makefile.am index 7948802..1af90e7 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -24,6 +24,7 @@ INCLUDES = -I.. -I$(top_srcdir)/include BUILT_SOURCES = assuan-errors.c MOSTLYCLEANFILES = assuan-errors.c +bin_PROGRAMS = libassuan-config lib_LIBRARIES = libassuan.a include_HEADERS = assuan.h diff --git a/src/libassuan-config.in b/src/libassuan-config.in new file mode 100644 index 0000000..d9636c5 --- /dev/null +++ b/src/libassuan-config.in @@ -0,0 +1,114 @@ +#!/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. + +PGM=libassuan-config +libs="@LIBASSUAN_CONFIG_LIBS@" +cflags="@LIBASSUAN_CONFIG_CFLAGS@" +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includes="" +libdirs="" +exec_prefix_set=no +echo_libs=no +echo_cflags=no +echo_prefix=no +echo_exec_prefix=no + + +usage() +{ + cat <<EOF +Usage: $PGM [OPTIONS] +Options: + [--prefix[=DIR]] + [--exec-prefix[=DIR]] + [--version] + [--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=*) + prefix=$optarg + if test $exec_prefix_set = no ; then + exec_prefix=$optarg + fi + ;; + --prefix) + echo_prefix=yes + ;; + --exec-prefix=*) + exec_prefix=$optarg + exec_prefix_set=yes + ;; + --exec-prefix) + echo_exec_prefix=yes + ;; + --version) + echo "@VERSION@" + exit 0 + ;; + --cflags) + echo_cflags=yes + ;; + --libs) + echo_libs=yes + ;; + *) + usage 1 1>&2 + ;; + esac + shift +done + +if test "$echo_prefix" = "yes"; then + echo $prefix +fi + +if test "$echo_exec_prefix" = "yes"; then + echo $exec_prefix +fi + +if test "$echo_cflags" = "yes"; then + if test "@includedir@" != "/usr/include" ; then + includes="-I@includedir@" + for i in $cflags ; do + if test "$i" = "-I@includedir@" ; then + includes="" + fi + done + fi + echo $includes $cflags +fi + +if test "$echo_libs" = "yes"; then + if test "@libdir@" != "/usr/lib" ; then + libdirs="-L@libdir@" + for i in $libs ; do + if test "$i" = "-L@libdir@" ; then + libdirs="" + fi + done + fi + echo $libdirs $libs +fi |