|
@@ -18,6 +18,27 @@ AC_DEFUN([TOR_EXTEND_CODEPATH],
|
|
fi
|
|
fi
|
|
])
|
|
])
|
|
|
|
|
|
|
|
+AC_DEFUN([TOR_DEFINE_CODEPATH],
|
|
|
|
+[
|
|
|
|
+ if test x$1 = "x(system)"; then
|
|
|
|
+ TOR_LDFLAGS_$2=""
|
|
|
|
+ TOR_CPPFLAGS_$2=""
|
|
|
|
+ else
|
|
|
|
+ if test -d "$1/lib"; then
|
|
|
|
+ TOR_LDFLAGS_$2="-L$1/lib"
|
|
|
|
+ else
|
|
|
|
+ TOR_LDFLAGS_$2="-L$1"
|
|
|
|
+ fi
|
|
|
|
+ if test -d "$1/include"; then
|
|
|
|
+ TOR_CPPFLAGS_$2="-I$1/include"
|
|
|
|
+ else
|
|
|
|
+ TOR_CPPFLAGS_$2="-I$1"
|
|
|
|
+ fi
|
|
|
|
+ fi
|
|
|
|
+ AC_SUBST(TOR_CPPFLAGS_$2)
|
|
|
|
+ AC_SUBST(TOR_LDFLAGS_$2)
|
|
|
|
+])
|
|
|
|
+
|
|
dnl 1:libname
|
|
dnl 1:libname
|
|
AC_DEFUN([TOR_WARN_MISSING_LIB], [
|
|
AC_DEFUN([TOR_WARN_MISSING_LIB], [
|
|
h=""
|
|
h=""
|
|
@@ -118,6 +139,8 @@ if test $tor_cv_library_$1_dir != "(system)"; then
|
|
TOR_EXTEND_CODEPATH($tor_cv_library_$1_dir)
|
|
TOR_EXTEND_CODEPATH($tor_cv_library_$1_dir)
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
+TOR_DEFINE_CODEPATH($tor_cv_library_$1_dir , $1)
|
|
|
|
+
|
|
if test -z "$CROSS_COMPILE"; then
|
|
if test -z "$CROSS_COMPILE"; then
|
|
AC_CACHE_CHECK([whether we need extra options to link $1],
|
|
AC_CACHE_CHECK([whether we need extra options to link $1],
|
|
tor_cv_library_$1_linker_option, [
|
|
tor_cv_library_$1_linker_option, [
|
|
@@ -151,9 +174,13 @@ if test -z "$CROSS_COMPILE"; then
|
|
]) dnl end cache check check for extra options.
|
|
]) dnl end cache check check for extra options.
|
|
|
|
|
|
if test "$tor_cv_library_$1_linker_option" != "(none)" ; then
|
|
if test "$tor_cv_library_$1_linker_option" != "(none)" ; then
|
|
- LDFLAGS="$tor_cv_library_$1_linker_option $LDFLAGS"
|
|
+ TOR_LDFLAGS_$1="$tor_cv_library_$1_linker_option"
|
|
fi
|
|
fi
|
|
fi # cross-compile
|
|
fi # cross-compile
|
|
|
|
|
|
|
|
+LIBS="$tor_saved_LIBS"
|
|
|
|
+LDFLAGS="$tor_saved_LDFLAGS"
|
|
|
|
+CPPFLAGS="$TOR_CPPFLAGS_$1 $tor_saved_CPPFLAGS"
|
|
|
|
+
|
|
]) dnl end defun
|
|
]) dnl end defun
|
|
|
|
|