Changeset 9358

Show
Ignore:
Timestamp:
08/20/08 15:41:26
Author:
eb
Message:

resolved problem w/ lib vs lib64; added boost stuff to gnuradio-core.pc.in

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/trunk/config/gr_lib64.m4

    r9336 r9358  
    2020dnl  
    2121 
    22 # GR_LIB64() 
    23 
    24 # Checks to see if we're on a x86_64 or powerpc64 machine, and if so, detemine 
    25 # if libdir should end in "64" or not. 
    26 #  
    27 # May append "64" to libdir. 
    28 # Sets gr_libdir_suffix to "" or "64" 
    29 
     22dnl GR_LIB64() 
     23dnl 
     24dnl Checks to see if we're on a x86_64 or powerpc64 machine, and if so, determine 
     25dnl if libdir should end in "64" or not. 
     26dnl 
     27dnl Sets gr_libdir_suffix to "" or "64" and calls AC_SUBST(gr_libdir_suffix) 
     28dnl May append "64" to libdir. 
     29dnl 
     30dnl The current heuristic is: 
     31dnl   if the host_cpu isn't x86_64 or powerpc64, then "" 
     32dnl   if the host_os isn't linux, then "" 
     33dnl   if we're cross-compiling, ask the linker, by way of the selected compiler 
     34dnl   if we're x86_64 and there's a /lib64 and it's not a symlink, then "64", else "" 
     35dnl   else ask the compiler 
     36dnl 
    3037AC_DEFUN([GR_LIB64],[ 
    3138  AC_REQUIRE([AC_CANONICAL_HOST]) 
    3239  AC_REQUIRE([AC_PROG_CXX]) 
    3340 
    34   # If we're using g++, extract the first SEARCH_DIR("...") entry from the linker script 
    35   # and see if it contains a suffix after the final .../lib part of the path. 
    36   # (This works because the linker script varies depending on whether we're generating 
    37   # 32-bit or 64-bit executables) 
     41  AC_MSG_CHECKING([gr_libdir_suffix]) 
     42  gr_libdir_suffix="" 
     43  AC_SUBST(gr_libdir_suffix) 
    3844 
    39   AC_MSG_CHECKING([libdir suffix]) 
     45  case "$host_os" in 
     46    linux*) is_linux=yes ;; 
     47    *)      is_linux=no  ;; 
     48  esac 
     49 
     50  if test "$is_linux" = no || test "$host_cpu" != "x86_64" && test "$host_cpu" != "powerpc64"; then 
     51    gr_libdir_suffix="" 
     52  elif test "$cross_compiling" = yes; then 
     53    _GR_LIB64_ASK_COMPILER 
     54  elif test "$host_cpu" = "x86_64"; then 
     55    if test -d /lib64 && test ! -L /lib64; then 
     56      gr_libdir_suffix=64 
     57    fi 
     58  else 
     59    _GR_LIB64_ASK_COMPILER   
     60  fi 
     61  AC_MSG_RESULT([$gr_libdir_suffix]) 
     62 
     63 
     64  AC_MSG_CHECKING([whether to append 64 to libdir]) 
     65  t=${libdir##*/lib} 
     66  if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then 
     67    libdir=${libdir}64 
     68    AC_MSG_RESULT([yes. Setting libdir to $libdir]) 
     69  else 
     70    AC_MSG_RESULT([no]) 
     71  fi 
     72]) 
     73 
     74dnl If we're using g++, extract the first SEARCH_DIR("...") entry from the linker script 
     75dnl and see if it contains a suffix after the final .../lib part of the path. 
     76dnl (This works because the linker script varies depending on whether we're generating 
     77dnl 32-bit or 64-bit executables) 
     78dnl 
     79AC_DEFUN([_GR_LIB64_ASK_COMPILER],[ 
    4080  if test "$ac_cv_cxx_compiler_gnu" = "yes"; 
    4181  then 
    4282    gr_libdir_suffix=`$CXX -Wl,--verbose 2>/dev/null | sed -n -e '/SEARCH_DIR/{s/;.*$//; s,^.*/,,; s/".*$//; s/^lib//; p}'` 
    4383  fi 
    44   AC_MSG_RESULT([$gr_libdir_suffix]) 
    45   AC_SUBST(gr_libdir_suffix) 
     84]) 
    4685 
    47   if test "$host_cpu" = "x86_64" || test "$host_cpu" = "powerpc64" ; then 
    48     AC_MSG_CHECKING([libdir for lib64 suffix]) 
    49     t=${libdir##*/lib} 
    50     if test "$t" != 64 && test "$gr_libdir_suffix" = "64"; then 
    51       libdir=${libdir}64 
    52       AC_MSG_RESULT([no. Setting libdir to $libdir]) 
    53     else 
    54       AC_MSG_RESULT([yes]) 
    55     fi 
    56   fi 
    57 ]) 
  • gnuradio/trunk/gnuradio-core/gnuradio-core.pc.in

    r7888 r9358  
    88Requires: gnuradio-omnithread fftw3f 
    99Version: @VERSION@ 
    10 Libs: -L${libdir} -lgnuradio-core 
    11 Cflags: -I${includedir} @DEFINES@ 
     10Libs: -L${libdir} -lgnuradio-core @BOOST_LDFLAGS@ @BOOST_THREAD_LIB@ @BOOST_DATE_TIME_LIB@ 
     11Cflags: @BOOST_CPPFLAGS@ @BOOST_CXXFLAGS@ -I${includedir} @DEFINES@