[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Toon-members] TooN Makefile.in configure configure.ac interna...
From: |
Edward Rosten |
Subject: |
[Toon-members] TooN Makefile.in configure configure.ac interna... |
Date: |
Tue, 29 Jun 2010 14:20:55 +0000 |
CVSROOT: /cvsroot/toon
Module name: TooN
Changes by: Edward Rosten <edrosten> 10/06/29 14:20:55
Modified files:
. : Makefile.in configure configure.ac
internal : config.hh
Log message:
Added pkg-config script from Michael Marner <marnermr at cs dot unisa
dot edu dot au>
Currently, the script uses a rather simple test for LAPACK.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/Makefile.in?cvsroot=toon&r1=1.27&r2=1.28
http://cvs.savannah.gnu.org/viewcvs/TooN/configure?cvsroot=toon&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/TooN/configure.ac?cvsroot=toon&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/TooN/internal/config.hh?cvsroot=toon&r1=1.29&r2=1.30
Patches:
Index: Makefile.in
===================================================================
RCS file: /cvsroot/toon/TooN/Makefile.in,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- Makefile.in 29 Jun 2010 14:03:06 -0000 1.27
+++ Makefile.in 29 Jun 2010 14:20:46 -0000 1.28
@@ -4,6 +4,7 @@
mandir = @mandir@
includedir = @includedir@
datarootdir = @datarootdir@
+pkgconfig = @PKGCONFIG_LIBDIR@
hdr = $(DESTDIR)/$(includedir)/TooN
@@ -20,6 +21,7 @@
cp -r optimization $(hdr)/
cp -r internal $(hdr)/
cp -r functions $(hdr)/
+ cp TooN.pc $(pkgconfig)/
internal/data_functions.hh: make_data_functions.awk
awk -f make_data_functions.awk > $@
Index: configure
===================================================================
RCS file: /cvsroot/toon/TooN/configure,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- configure 29 Jun 2010 14:03:56 -0000 1.11
+++ configure 29 Jun 2010 14:20:50 -0000 1.12
@@ -602,6 +602,10 @@
ac_subst_vars='LTLIBOBJS
LIBOBJS
+VERSION
+PKGCONFIG_LIBDIR
+SED
+PKG_CONFIG
OBJEXT
EXEEXT
ac_ct_CXX
@@ -2404,6 +2408,117 @@
+#
+# Test for Package Config
+#
+# Extract the first word of "pkg-config", so it can be a program name with
args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a
path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x
"$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test "x$PKG_CONFIG" = "x"; then
+ { $as_echo "$as_me:$LINENO: WARNING: Could not find pkg-config, will
not create pc file." >&5
+$as_echo "$as_me: WARNING: Could not find pkg-config, will not create pc
file." >&2;}
+else
+ # we need sed to find the pkg-config lib directory
+ # Extract the first word of "sed", so it can be a program name with
args.
+set dummy sed; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_SED+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$SED"; then
+ ac_cv_prog_SED="$SED" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x
"$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_SED="sed"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_SED" && ac_cv_prog_SED="{ { $as_echo "$as_me:$LINENO:
error: You Must install sed" >&5
+$as_echo "$as_me: error: You Must install sed" >&2;}
+ { (exit 1); exit 1; }; }"
+fi
+fi
+SED=$ac_cv_prog_SED
+if test -n "$SED"; then
+ { $as_echo "$as_me:$LINENO: result: $SED" >&5
+$as_echo "$SED" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ { $as_echo "$as_me:$LINENO: checking for pkg-config library dir" >&5
+$as_echo_n "checking for pkg-config library dir... " >&6; }
+ PKGCONFIG_LIBDIR="`echo $PKG_CONFIG | $SED -e
's~/bin/pkg-config$~~'`/lib/pkgconfig"
+ { $as_echo "$as_me:$LINENO: result: $PKGCONFIG_LIBDIR" >&5
+$as_echo "$PKGCONFIG_LIBDIR" >&6; }
+
+ ac_config_files="$ac_config_files TooN.pc"
+
+
+ # This will be put into the pc file
+ VERSION=version-2.0.0-beta7
+
+fi
+
+
+# See if we can find LAPACK
+#ACX_LAPACK(
+# LAPACK_LINKER_FLAGS="$LAPACK_LIBS $BLAS_LIBS $LIBS
$FLIBS"
+# AC_SUBST(LAPACK_LINKER_FLAGS)
+# , AC_ERROR([Could not find LAPACK])
+# )
+#
+
typeof=check
# Check whether --enable-lapack was given.
if test "${enable_lapack+set}" = set; then
@@ -2433,6 +2548,7 @@
if test "$lapack" == ""
then
+
{ $as_echo "$as_me:$LINENO: checking for dgesvd_ in -llapack" >&5
$as_echo_n "checking for dgesvd_ in -llapack... " >&6; }
if test "${ac_cv_lib_lapack_dgesvd_+set}" = set; then
@@ -2499,11 +2615,16 @@
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_lapack_dgesvd_" >&5
$as_echo "$ac_cv_lib_lapack_dgesvd_" >&6; }
if test "x$ac_cv_lib_lapack_dgesvd_" = x""yes; then
- lapack=yes
-else
- lapack=no
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBLAPACK 1
+_ACEOF
+
+ LIBS="-llapack $LIBS"
+
fi
+ lapack=no
+ test ac_cv_lib_lapack_dgesvd_ = yes && lapack=yes
fi
if test "$lapack" != "no"
@@ -3672,6 +3793,7 @@
for ac_config_target in $ac_config_targets
do
case $ac_config_target in
+ "TooN.pc") CONFIG_FILES="$CONFIG_FILES TooN.pc" ;;
"internal/config.hh") CONFIG_HEADERS="$CONFIG_HEADERS internal/config.hh"
;;
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
Index: configure.ac
===================================================================
RCS file: /cvsroot/toon/TooN/configure.ac,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- configure.ac 29 Jun 2010 14:03:56 -0000 1.12
+++ configure.ac 29 Jun 2010 14:20:54 -0000 1.13
@@ -63,6 +63,35 @@
+#
+# Test for Package Config
+#
+AC_PATH_PROG(PKG_CONFIG, pkg-config)
+if test "x$PKG_CONFIG" = "x"; then
+ AC_MSG_WARN([Could not find pkg-config, will not create pc file.])
+else
+ # we need sed to find the pkg-config lib directory
+ AC_CHECK_PROG(SED,sed,sed,AC_MSG_ERROR([You Must install sed]))
+ AC_MSG_CHECKING([for pkg-config library dir])
+ PKGCONFIG_LIBDIR="`echo $PKG_CONFIG | $SED -e
's~/bin/pkg-config$~~'`/lib/pkgconfig"
+ AC_MSG_RESULT($PKGCONFIG_LIBDIR)
+ AC_SUBST(PKGCONFIG_LIBDIR)
+ AC_CONFIG_FILES([ TooN.pc ])
+
+ # This will be put into the pc file
+ VERSION=AC_PACKAGE_VERSION()
+ AC_SUBST(VERSION)
+fi
+
+
+# See if we can find LAPACK
+#ACX_LAPACK(
+# LAPACK_LINKER_FLAGS="$LAPACK_LIBS $BLAS_LIBS $LIBS
$FLIBS"
+# AC_SUBST(LAPACK_LINKER_FLAGS)
+# , AC_ERROR([Could not find LAPACK])
+# )
+#
+
typeof=check
AC_ARG_ENABLE(lapack, [AS_HELP_STRING([--enable-lapack],[Use LAPACK where
optional])], [lapack=$enableval])
AC_ARG_ENABLE(typeof, [AS_HELP_STRING([--enable-typeof=X],[Force typeof to be
decltype, __typeof__, typeof, boost or none])], [typeof=$enableval])
@@ -75,7 +104,9 @@
if test "$lapack" == ""
then
- AC_CHECK_LIB(lapack, dgesvd_, [lapack=yes], [lapack=no])
+ AC_CHECK_LIB(lapack, dgesvd_)
+ lapack=no
+ test ac_cv_lib_lapack_dgesvd_ = yes && lapack=yes
fi
if test "$lapack" != "no"
Index: internal/config.hh
===================================================================
RCS file: /cvsroot/toon/TooN/internal/config.hh,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- internal/config.hh 29 Jun 2010 14:03:07 -0000 1.29
+++ internal/config.hh 29 Jun 2010 14:20:54 -0000 1.30
@@ -11,6 +11,6 @@
#define TOON_DEPRECATED_GCC 1
-#define TOON_USE_LAPACK 1
+/* #undef TOON_USE_LAPACK */
/* #undef TOON_DEFAULT_PRECISION */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Toon-members] TooN Makefile.in configure configure.ac interna...,
Edward Rosten <=