Okay, this is well, a rough-cut, but I need some feedback.
The question I have is what should svn-config --link-ld print out?
A typical convention is to also print out your *own* libraries.
For example, `apr-config --link-ld` prints out:
% ./apr-config --link-ld
-L/pkg/httpd-2.0/lib -lapr
But, SVN has a ton of libraries, so it might print out (imagine one
long line):
-L/pkg/svn-cvs/lib -lsvn_auth-1 -lsvn_client-1 -lsvn_delta-1 -lsvn_fs-1
-lsvn_ra-1 -lsvn_ra_dav-1 -lsvn_ra_local-1 -lsvn_repos-1 -lsvn_subr-1
-lsvn_swig_py-1 -lsvn_wc-1
But, we'd also need to get the cyclic dependencies right (Solaris's
ld is picky about that stuff). And, those are only stored in
build.conf. And, it'd be possible to not need all of those
libraries.
Any hints? -- justin
Index: ./configure.in
===================================================================
--- ./configure.in
+++ ./configure.in 2002-07-11 14:06:24.000000000 -0700
@@ -391,7 +391,7 @@
dnl Final step: create the Makefile ----------------------------
-AC_OUTPUT([Makefile])
+AC_OUTPUT([Makefile svn-config], [chmod +x svn-config])
dnl Create all of the build directories
Index: ./svn-config.in
===================================================================
--- ./svn-config.in
+++ ./svn-config.in 2002-07-11 14:09:57.000000000 -0700
@@ -0,0 +1,132 @@
+#!/bin/sh
+# ====================================================================
+# Copyright (c) 2002 CollabNet. All rights reserved.
+#
+# This software is licensed as described in the file COPYING, which
+# you should have received as part of this distribution. The terms
+# are also available at http://subversion.tigris.org/license-1.html.
+# If newer versions of this license are posted there, you may use a
+# newer version instead, at your option.
+#
+# This software consists of voluntary contributions made by many
+# individuals. For exact contribution history, see the revision
+# history and logs, available at http://subversion.tigris.org/.
+# ====================================================================
+
+# SVN script designed to allow easy command line access to SVN
+# configuration parameters.
+
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+bindir="@bindir@"
+libdir="@libdir@"
+includedir="@includedir@"
+
+LIBS="@NEON_LIBS@ @SVN_APRUTIL_LIBS@ @SVN_APR_LIBS@ @SVN_DB_LIBS@ @LIBS@"
+CFLAGS="@CFLAGS@"
+CPPFLAGS="@CPPFLAGS@"
+INCLUDES="@SVN_NEON_INCLUDES@ @SVN_DB_INCLUDES@"
+LDFLAGS="@LDFLAGS@"
+
+SVN_SOURCE_DIR="@abs_srcdir@"
+SVN_BUILD_DIR="@abs_builddir@"
+
+show_usage()
+{
+ cat << EOF
+Usage: svn-config [OPTION]
+
+Known values for OPTION are:
+ --prefix[=DIR] change prefix to DIR
+ --includes print include information
+ --ldflags print linker flags
+ --libs print library information
+ --srcdir print SVN source directory
+ --help print this help
+
+When linking with libtool, an application should do something like:
+ SVN_LIBS="\`svn-config --link-libtool --libs\`"
+or when linking directly:
+ SVN_LIBS="\`svn-config --link-ld --libs\`"
+
+An application should use the results of --includes, and --ldflags in
+their build process.
+EOF
+}
+
+if test $# -eq 0; then
+ show_usage
+ exit 1
+fi
+
+thisdir="`dirname $0`"
+thisdir="`cd $thisdir && pwd`"
+if test -d $bindir; then
+ tmpbindir="`cd $bindir && pwd`"
+else
+ tmpbindir=""
+fi
+if test "$tmpbindir" = "$thisdir"; then
+ location=installed
+elif test "$SVN_SOURCE_DIR" = "$thisdir"; then
+ location=source
+else
+ location=build
+fi
+
+flags=""
+
+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
+ exit 0
+ ;;
+ --libs)
+ flags="$flags $LIBS"
+ ;;
+ --includes)
+ if test "$location" = "installed"; then
+ flags="$flags -I$includedir $INCLUDES"
+ elif test "$location" = "source"; then
+ flags="$flags -I$SVN_SOURCE_DIR/include $INCLUDES"
+ else
+ flags="$flags -I$thisdir/include -I$SVN_SOURCE_DIR/include $INCLUDES"
+ fi
+ ;;
+ --ldflags)
+ flags="$flags $LDFLAGS"
+ ;;
+ --srcdir)
+ echo $SVN_SOURCE_DIR
+ exit 0
+ ;;
+ --help)
+ show_usage
+ exit 0
+ ;;
+ *)
+ show_usage
+ exit 1
+ ;;
+ esac
+
+ # Next please.
+ shift
+done
+
+if test -n "$flags"; then
+ echo "$flags"
+fi
+
+exit 0
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 12 01:31:56 2002