[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7832 - in gnuradio/branches/developers/michaelld/bc_b
From: |
michaelld |
Subject: |
[Commit-gnuradio] r7832 - in gnuradio/branches/developers/michaelld/bc_behavior: . config gnuradio-core mblock pmt usrp |
Date: |
Mon, 25 Feb 2008 13:10:33 -0700 (MST) |
Author: michaelld
Date: 2008-02-25 13:10:32 -0700 (Mon, 25 Feb 2008)
New Revision: 7832
Modified:
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_build.m4
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_gnuradio_core.m4
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_mblock.m4
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_omnithread.m4
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_pmt.m4
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_usrp.m4
gnuradio/branches/developers/michaelld/bc_behavior/config/usrp_libusb.m4
gnuradio/branches/developers/michaelld/bc_behavior/configure.ac
gnuradio/branches/developers/michaelld/bc_behavior/gnuradio-core/gnuradio-core.pc.in
gnuradio/branches/developers/michaelld/bc_behavior/mblock/mblock.pc.in
gnuradio/branches/developers/michaelld/bc_behavior/pmt/pmt.pc.in
gnuradio/branches/developers/michaelld/bc_behavior/usrp/usrp-inband.pc.in
gnuradio/branches/developers/michaelld/bc_behavior/usrp/usrp.pc.in
Log:
* Prepends ${prefix}/lib/pkgconfig to the PKG_CONFIG_PATH
* adds explicit -L/dir/ect/ory if required to the .pc files for each
required library.
* Cleans up the grc_*.m4 files a bit more.
* Fixes, in some sense, the '--with-foo=arg' use of configure. Not
perfect, but should be good enough for most users.
Modified: gnuradio/branches/developers/michaelld/bc_behavior/config/grc_build.m4
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/config/grc_build.m4
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/config/grc_build.m4
2008-02-25 20:10:32 UTC (rev 7832)
@@ -83,15 +83,17 @@
AC_DEFUN([_GRC_WITH_PKG_CONFIG_CHECK],[
# save PKG_CONFIG_PATH, restore at the end
s_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
- # create the PKG_CONFIG_PATH, via this component's arg, if provided
+
+ # create the PKG_CONFIG_PATH, via this component's arg, if provided;
# else use the environment's PKG_CONFIG_PATH
l_PKG_CONFIG_PATH=$[with_]$3[_val]
if test x$l_PKG_CONFIG_PATH != x; then
export PKG_CONFIG_PATH=$l_PKG_CONFIG_PATH
fi
- # finally, do the check; error out if not found
- PKG_CHECK_EXISTS($2, [], AC_MSG_ERROR([Component $1: PKGCONFIG cannot find
info.]))
+ # do the check; error out if not found
+ PKG_CHECK_EXISTS($2, passed=with,
+ AC_MSG_ERROR([Component $1: PKGCONFIG cannot find info.]))
# if PKG_CHECK_EXISTS returned, then this component's .pc file was
# found in the provided 'arg' PKG_CONFIG_PATH;
@@ -99,16 +101,25 @@
$3[_INCLUDES]=`$PKG_CONFIG --cflags-only-I $2`
$3[_LA]=`$PKG_CONFIG --libs $2`
$3[_INCLUDEDIR]=`$PKG_CONFIG --variable=includedir $2`
- $3[_LIBDIRPATH]=`$PKG_CONFIG --variable=libdir $2`
- # if 'arg' was provided, then it works for (at least) this component;
- # append the 'arg' to the saved PKG_CONFIG_PATH, and make it global
- if test x$l_PKG_CONFIG_PATH != x; then
- if test x$s_PKG_CONFIG_PATH != x; then
- export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${s_PKG_CONFIG_PATH}
- fi
+ GRC_PREFIX_LDFLAGS($prefix, $3, `$PKG_CONFIG --variable=libdir $2`)
+
+ # restore the saved PKG_CONFIG_PATH, in case any other component needs it
+ export PKG_CONFIG_PATH=${s_PKG_CONFIG_PATH}
+])
+
+# Check the $prefix versus the --with libdirpath for this component
+# $1 is the prefix
+# $2 is the --with component name
+# $3 is the --with component library path
+AC_DEFUN([GRC_PREFIX_LDFLAGS],[
+ $2[_LIBDIRPATH]=$3
+ # create LDFLAGS for this --with, if different from the provided $prefix
+ if test [x]"$1"[/lib] != [x]"$3"; then
+ $2[_LDFLAG]=[-L]$3
+ else
+ $2[_LDFLAG]=
fi
- passed=with
])
# Check list to see if any of the required components were skipped
@@ -181,6 +192,7 @@
GRC_ADD_TO_LIST($2, LIBDIRPATH, ":")
AC_MSG_RESULT([Component $1 will be included from a pre-installed
library and includes.])
else
+ $2[_LDFLAG]=
if test x$enable_$2 != xno; then
$3
build_dirs="$build_dirs $1"
@@ -195,6 +207,11 @@
skipped_dirs="$skipped_dirs $1"
$2_skipped=yes
else
+ AC_SUBST($2[_INCLUDES])
+ AC_SUBST($2[_LA])
+ AC_SUBST($2[_INCLUDEDIR])
+ AC_SUBST($2[_LIBDIRPATH])
+ AC_SUBST($2[_LDFLAG])
$2_skipped=no
fi
])
Modified:
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_gnuradio_core.m4
===================================================================
---
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_gnuradio_core.m4
2008-02-25 02:39:25 UTC (rev 7831)
+++
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_gnuradio_core.m4
2008-02-25 20:10:32 UTC (rev 7832)
@@ -100,10 +100,7 @@
touch gnuradio-core/src/lib/swig/gnuradio_swig_py_io.d
])
])
- AC_SUBST(gnuradio_core_INCLUDES)
- AC_SUBST(gnuradio_core_LA)
AC_SUBST(gnuradio_core_I)
- AC_SUBST(gnuradio_core_LIBDIRPATH)
AC_SUBST(gnuradio_core_SWIGDIRPATH)
AC_SUBST(gnuradio_core_PYDIRPATH)
])
Modified:
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_mblock.m4
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/config/grc_mblock.m4
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/config/grc_mblock.m4
2008-02-25 20:10:32 UTC (rev 7832)
@@ -48,7 +48,4 @@
dnl run_tests is created from run_tests.in. Make it executable.
dnl AC_CONFIG_COMMANDS([run_tests_mblock], [chmod +x
mblock/src/python/run_tests])
])
-
- AC_SUBST(mblock_INCLUDES)
- AC_SUBST(mblock_LA)
])
Modified:
gnuradio/branches/developers/michaelld/bc_behavior/config/grc_omnithread.m4
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/config/grc_omnithread.m4
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/config/grc_omnithread.m4
2008-02-25 20:10:32 UTC (rev 7832)
@@ -39,8 +39,4 @@
dnl run_tests is created from run_tests.in. Make it executable.
dnl AC_CONFIG_COMMANDS([run_tests_omnithread], [chmod +x
omnithread/run_tests])
])
-
- AC_SUBST(omnithread_INCLUDES)
- AC_SUBST(omnithread_LA)
- AC_SUBST(omnithread_LIBDIRPATH)
])
Modified: gnuradio/branches/developers/michaelld/bc_behavior/config/grc_pmt.m4
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/config/grc_pmt.m4
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/config/grc_pmt.m4
2008-02-25 20:10:32 UTC (rev 7832)
@@ -48,7 +48,4 @@
dnl run_tests is created from run_tests.in. Make it executable.
dnl AC_CONFIG_COMMANDS([run_tests_pmt], [chmod +x
pmt/src/python/run_tests])
])
-
- AC_SUBST(pmt_INCLUDES)
- AC_SUBST(pmt_LA)
])
Modified: gnuradio/branches/developers/michaelld/bc_behavior/config/grc_usrp.m4
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/config/grc_usrp.m4
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/config/grc_usrp.m4
2008-02-25 20:10:32 UTC (rev 7832)
@@ -66,20 +66,6 @@
AC_CHECK_FUNCS([getrusage sched_setscheduler pthread_setschedparam])
AC_CHECK_FUNCS([sigaction snprintf])
- # There are 2 pkg-config files; the one for usrp requires omnithread
- # for Darwin only.
- case "$host_os" in
- darwin*)
- # for usrp.pc.in
- usrp_darwin_omnithread_pc_requires="gnuradio-omnithread"
- usrp_darwin_omnithread_pc_la="-lgromnithread"
- ;;
- *)
- # for usrp.pc.in (blanks)
- usrp_darwin_omnithread_pc_requires=""
- usrp_darwin_omnithread_pc_la=""
- ;;
- esac
passed=yes
# Don't do usrp if omnithread, mblock, or pmt skipped
GRC_CHECK_SKIPPED(usrp, [omnithread mblock pmt])
@@ -103,10 +89,19 @@
GRC_BUILD_CONDITIONAL(usrp)
- AC_SUBST(usrp_INCLUDES)
- AC_SUBST(usrp_LA)
+ # There are 2 pkg-config files (usrp, and usrp-inband); the one
+ # for usrp requires omnithread for Darwin only. Create a variable
+ # for just the usrp.pc.in case.
+ case "$host_os" in
+ darwin*)
+ usrp_darwin_omnithread_pc_la="$omnithread_LDFLAG -lgromnithread"
+ ;;
+ *) # (blanks)
+ usrp_darwin_omnithread_pc_la=""
+ ;;
+ esac
+
AC_SUBST(usrp_inband_INCLUDES)
AC_SUBST(usrp_inband_LA)
- AC_SUBST(usrp_darwin_omnithread_pc_requires)
AC_SUBST(usrp_darwin_omnithread_pc_la)
])
Modified:
gnuradio/branches/developers/michaelld/bc_behavior/config/usrp_libusb.m4
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/config/usrp_libusb.m4
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/config/usrp_libusb.m4
2008-02-25 20:10:32 UTC (rev 7832)
@@ -42,6 +42,12 @@
AC_LANG_POP
+ # try to find the -L LDFLAG for libusb, using PKGCONFIG
+ PKG_CHECK_EXISTS(libusb,
+ [libusb_LDFLAG=-L`$PKG_CONFIG --variable=libdir libusb`],
+ [libusb_LDFLAG=])
+ AC_SUBST(libusb_LDFLAG)
+
if test $libusbok = yes; then
AC_SUBST(USB_LIBS)
ifelse([$1], , :, [$1])
Modified: gnuradio/branches/developers/michaelld/bc_behavior/configure.ac
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/configure.ac
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/configure.ac
2008-02-25 20:10:32 UTC (rev 7832)
@@ -33,11 +33,17 @@
AM_INIT_AUTOMAKE(gnuradio,3.1svn)
+dnl add ${prefix}/lib/pkgconfig to the head of the PKG_CONFIG_PATH
+if test [x]${PKG_CONFIG_PATH} = x; then
+ PKG_CONFIG_PATH=${prefix}/lib/pkgconfig
+else
+ PKG_CONFIG_PATH=${prefix}/lib/pkgconfig:${PKG_CONFIG_PATH}
+fi
+export PKG_CONFIG_PATH
DEFINES=""
AC_SUBST(DEFINES)
-
dnl Remember if the user explicity set CXXFLAGS
if test -n "${CXXFLAGS}"; then
user_set_cxxflags=yes
Modified:
gnuradio/branches/developers/michaelld/bc_behavior/gnuradio-core/gnuradio-core.pc.in
===================================================================
---
gnuradio/branches/developers/michaelld/bc_behavior/gnuradio-core/gnuradio-core.pc.in
2008-02-25 02:39:25 UTC (rev 7831)
+++
gnuradio/branches/developers/michaelld/bc_behavior/gnuradio-core/gnuradio-core.pc.in
2008-02-25 20:10:32 UTC (rev 7832)
@@ -7,5 +7,5 @@
Description: GNU Software Radio toolkit
Requires:
Version: @VERSION@
-Libs: -L${libdir} -lgnuradio-core @FFTW3F_LIBS@ -lgromnithread
+Libs: -L${libdir} -lgnuradio-core @FFTW3F_LIBS@ @omnithread_LDFLAG@
-lgromnithread
Cflags: -I${includedir} @DEFINES@ @PTHREAD_CFLAGS@
Modified: gnuradio/branches/developers/michaelld/bc_behavior/mblock/mblock.pc.in
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/mblock/mblock.pc.in
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/mblock/mblock.pc.in
2008-02-25 20:10:32 UTC (rev 7832)
@@ -7,5 +7,5 @@
Description: The GNU Radio message block library
Requires:
Version: @VERSION@
-Libs: -L${libdir} -lmblock -lgromnithread -lpmt
+Libs: -L${libdir} -lmblock @omnithread_LDFLAG@ -lgromnithread @pmt_LDFLAG@
-lpmt
Cflags: -I${includedir} @DEFINES@ @PTHREAD_CFLAGS@
Modified: gnuradio/branches/developers/michaelld/bc_behavior/pmt/pmt.pc.in
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/pmt/pmt.pc.in
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/pmt/pmt.pc.in
2008-02-25 20:10:32 UTC (rev 7832)
@@ -7,5 +7,5 @@
Description: The GNU Radio Polymorphic Type library
Requires:
Version: @VERSION@
-Libs: -L${libdir} -lpmt -lgromnithread
+Libs: -L${libdir} -lpmt @omnithread_LDFLAG@ -lgromnithread
Cflags: -I${includedir} @DEFINES@ @PTHREAD_CFLAGS@
Modified:
gnuradio/branches/developers/michaelld/bc_behavior/usrp/usrp-inband.pc.in
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/usrp/usrp-inband.pc.in
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/usrp/usrp-inband.pc.in
2008-02-25 20:10:32 UTC (rev 7832)
@@ -7,5 +7,5 @@
Description: USRP C++ Interface with in-band signaling
Requires:
Version: @VERSION@
-Libs: -L${libdir} -lusrp-inband -lusrp -lmblock -lpmt -lgromnithread -lusb
+Libs: -L${libdir} -lusrp-inband @usrp_LDFLAG@ -lusrp @mblock_LDFLAG@ -lmblock
@pmt_LDFLAG@ -lpmt @omnithread_LDFLAG@ -lgromnithread @libusb_LDFLAG@ -lusb
Cflags: -I${includedir} @DEFINES@
Modified: gnuradio/branches/developers/michaelld/bc_behavior/usrp/usrp.pc.in
===================================================================
--- gnuradio/branches/developers/michaelld/bc_behavior/usrp/usrp.pc.in
2008-02-25 02:39:25 UTC (rev 7831)
+++ gnuradio/branches/developers/michaelld/bc_behavior/usrp/usrp.pc.in
2008-02-25 20:10:32 UTC (rev 7832)
@@ -7,5 +7,5 @@
Description: USRP Client Side C++ interface
Requires:
Version: @VERSION@
-Libs: -L${libdir} -lusrp -lusb @usrp_darwin_omnithread_pc_la@
+Libs: -L${libdir} -lusrp @usrp_darwin_omnithread_pc_la@ @libusb_LDFLAG@ -lusb
Cflags: -I${includedir} @DEFINES@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7832 - in gnuradio/branches/developers/michaelld/bc_behavior: . config gnuradio-core mblock pmt usrp,
michaelld <=