X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=configure.in;h=332551ee2f0ed6c0f2b39e9841c1866c762a1543;hb=75f078b3925e9d2502a2b03b1a82901fafc40f09;hp=8f3bbdf129ed8bc1480badc3617be26a8521a006;hpb=21eff7095c50bcdc74000e6cda0c76aa3d16b854;p=openocd.git diff --git a/configure.in b/configure.in index 8f3bbdf129..332551ee2f 100644 --- a/configure.in +++ b/configure.in @@ -36,15 +36,27 @@ is_win32=no # And - if we are being installed there - the odds are # The libraries unique to what we are are there too. # + +# Expand nd deal with NONE - just like configure will do later +OCDprefix=$prefix +OCDxprefix=$exec_prefix +test x"$OCDprefix" = xNONE && OCDprefix=$ac_default_prefix +# Let make expand exec_prefix. +test x"$OCDxprefix" = xNONE && OCDxprefix="$OCDprefix" + + # what matters is the "exec-prefix" -if test $exec_prefix != $ac_default_prefix +if test "$OCDxprefix" != "$ac_default_prefix" then + # We are installing in a non-standard place + # Nonstandard --prefix and/or --exec-prefix + # We have an override of some sort. # use build specific install library dir - LDFLAGS="$LDFLAGS -L$libdir" + + LDFLAGS="$LDFLAGS -L$OCDxprefix/lib" # RPATH becomes an issue on Linux only - if test $host_os = linux-gnu - then - LDFLAGS="$LDFLAGS -Wl,-rpath,$libdir" + if test $host_os = linux-gnu || test $host_os = linux ; then + LDFLAGS="$LDFLAGS -Wl,-rpath,$OCDxprefix/lib" fi # The "INCDIR" is also usable CFLAGS="$CFLAGS -I$includedir" @@ -487,7 +499,7 @@ if test $build_ft2232_ftd2xx = yes ; then AC_MSG_CHECKING([for libftd2xx.a (linux)]) # Must be linux - # Cause FTDICHIP does not supply a MAC-OS version - if test $host_os != linux-gnu; then + if test $host_os != linux-gnu && test $host_os != linux ; then AC_MSG_ERROR([The (linux) ftd2xx library from FTDICHIP.com is linux only. Try --enable-ft2232-libftdi instead]) fi # Are we given a TAR directory?