summaryrefslogtreecommitdiff
path: root/gdbsupport/configure
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport/configure')
-rwxr-xr-xgdbsupport/configure29
1 files changed, 23 insertions, 6 deletions
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 8dfd608408e..a4871f8d5bc 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -770,6 +770,7 @@ with_intel_pt
with_gnu_ld
enable_rpath
with_libipt_prefix
+with_libipt_type
enable_unit_tests
enable_werror
enable_build_warnings
@@ -1433,6 +1434,7 @@ Optional Packages:
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
--without-libipt-prefix don't search for libipt in includedir and libdir
+ --with-libipt-type=TYPE type of library to search for (auto/static/shared)
Some influential environment variables:
CC C compiler command
@@ -9821,6 +9823,16 @@ if test "${with_libipt_prefix+set}" = set; then :
fi
+
+# Check whether --with-libipt-type was given.
+if test "${with_libipt_type+set}" = set; then :
+ withval=$with_libipt_type; with_libipt_type=$withval
+else
+ with_libipt_type=auto
+fi
+
+ lib_type=`eval echo \$with_libipt_type`
+
LIBIPT=
LTLIBIPT=
INCIPT=
@@ -9858,13 +9870,13 @@ fi
found_so=
found_a=
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
found_dir="$additional_libdir"
found_so="$additional_libdir/lib$name.$shlibext"
if test -f "$additional_libdir/lib$name.la"; then
found_la="$additional_libdir/lib$name.la"
fi
- else
+ elif test x$lib_type != xshared; then
if test -f "$additional_libdir/lib$name.$libext"; then
found_dir="$additional_libdir"
found_a="$additional_libdir/lib$name.$libext"
@@ -9888,13 +9900,13 @@ fi
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
found_dir="$dir"
found_so="$dir/lib$name.$shlibext"
if test -f "$dir/lib$name.la"; then
found_la="$dir/lib$name.la"
fi
- else
+ elif test x$lib_type != xshared; then
if test -f "$dir/lib$name.$libext"; then
found_dir="$dir"
found_a="$dir/lib$name.$libext"
@@ -10122,8 +10134,13 @@ fi
done
fi
else
- LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
- LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
+ if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
+ LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
+ LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
+ else
+ LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
+ LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
+ fi
fi
fi
fi