summaryrefslogtreecommitdiff
path: root/apr-config.in
diff options
context:
space:
mode:
authorJustin Erenkrantz <jerenkrantz@apache.org>2001-12-12 06:46:45 +0000
committerJustin Erenkrantz <jerenkrantz@apache.org>2001-12-12 06:46:45 +0000
commitb7350d4b0819095a7af382c45aa9a0a4ac6bf619 (patch)
treecb2af63f43c4caa352e1b1d2d236c44db1a252b2 /apr-config.in
parent830f076740de09fa1c3663011877661d3f27cd03 (diff)
downloadapr-b7350d4b0819095a7af382c45aa9a0a4ac6bf619.tar.gz
apr-config is a shell script modeled after glib-config et al that allows
third-parties easy access to APR configuration parameters. Reviewed by: Greg Stein git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62628 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'apr-config.in')
-rw-r--r--apr-config.in86
1 files changed, 86 insertions, 0 deletions
diff --git a/apr-config.in b/apr-config.in
new file mode 100644
index 000000000..203fe78df
--- /dev/null
+++ b/apr-config.in
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+PREFIX="@prefix@"
+EXEC_PREFIX="@exec_prefix@"
+LIBDIR="@libdir@"
+INCLUDEDIR="@includedir@"
+CC="@CC@"
+CPP="@CPP@"
+SHELL="@SHELL@"
+CPPFLAGS="@EXTRA_CPPFLAGS@"
+CFLAGS="@EXTRA_CFLAGS@"
+LDFLAGS="@EXTRA_LDFLAGS@"
+LIBS="@EXTRA_LIBS@"
+INCLUDES="@EXTRA_INCLUDES@"
+LIBTOOL_LIBS="@LIBTOOL_LIBS@"
+SHLIBPATH_VAR="@shlibpath_var@"
+APR_SOURCE_DIR="@abs_srcdir@"
+APR_SO_EXT="@so_ext@"
+APR_LIB_TARGET="@export_lib_target@"
+
+show_usage()
+{
+ cat << EOF
+Usage: apr-config [OPTION]
+
+Known values for OPTION are:
+ --prefix=DIR change prefix to DIR
+ --cflags print C compiler flags
+ --cppflags print cpp flags
+ --includes print include information
+ --ldflags print linker flags
+ --libs print library information
+ --help print this help
+EOF
+}
+
+if test $# -eq 0; then
+ show_usage
+ exit 1
+fi
+
+while test $# -gt 0; do
+ # Normalize the prefix.
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ # It is possible for the user to override our prefix.
+ --prefix=*)
+ prefix=$optarg
+ ;;
+ --prefix)
+ echo $PREFIX
+ ;;
+ --cflags)
+ echo $CFLAGS
+ ;;
+ --cppflags)
+ echo $CPPFLAGS
+ ;;
+ --libs)
+ echo $LIBS
+ ;;
+ --ldflags)
+ echo $LDFLAGS
+ ;;
+ --includes)
+ echo $INCLUDES
+ ;;
+ --help)
+ show_usage
+ exit 1
+ ;;
+ *)
+ show_usage
+ exit 1
+ ;;
+ esac
+
+ # Next please.
+ shift
+done
+
+exit 0