kopia lustrzana https://gitlab.com/sane-project/backends
add --enable-rpath option to configure
Allow user to configure support for rpath compiler option. Ported from Fedora's sane-backend patches. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>merge-requests/1/head
rodzic
e75d6e5e0c
commit
cc75fa5dc2
|
@ -1,3 +1,7 @@
|
|||
2010-04-02 Chris Bagwell <chris at cnpbagwell dot com>
|
||||
* acinclude.m4: Add --enable-rpath option to configure.
|
||||
Ported from Fedora patches.
|
||||
|
||||
2010-04-02 Chris Bagwell <chris at cnpbagwell dot com>
|
||||
* backend/kvs1024*: Remove includes of usb.h
|
||||
directly into backend. Complete prototype
|
||||
|
|
36
acinclude.m4
36
acinclude.m4
|
@ -393,19 +393,29 @@ dnl
|
|||
|
||||
AC_DEFUN([SANE_LINKER_RPATH],
|
||||
[dnl AC_REQUIRE([AC_SUBST])dnl This line resulted in an empty AC_SUBST() !!
|
||||
AC_CACHE_CHECK([linker parameter to set runtime link path], my_cv_LINKER_RPATH,
|
||||
[my_cv_LINKER_RPATH=
|
||||
case "$host_os" in
|
||||
linux* | freebsd* | netbsd* | openbsd* | irix*)
|
||||
# I believe this only works with GNU ld [pere 2001-04-16]
|
||||
my_cv_LINKER_RPATH="-Wl,-rpath,"
|
||||
;;
|
||||
solaris*)
|
||||
my_cv_LINKER_RPATH="-R "
|
||||
;;
|
||||
esac
|
||||
])
|
||||
LINKER_RPATH="$my_cv_LINKER_RPATH"
|
||||
AC_MSG_CHECKING([whether runtime link path should be used])
|
||||
AC_ARG_ENABLE([rpath],
|
||||
[AS_HELP_STRING([--enable-rpath],
|
||||
[use runtime library search path @<:@default=yes@:>@])])
|
||||
|
||||
LINKER_RPATH=
|
||||
AS_IF([test "x$enable_rpath" != xno],
|
||||
AC_MSG_RESULT([yes])
|
||||
[AC_CACHE_CHECK([linker parameter to set runtime link path], my_cv_LINKER_RPATH,
|
||||
[my_cv_LINKER_RPATH=
|
||||
case "$host_os" in
|
||||
linux* | freebsd* | netbsd* | openbsd* | irix*)
|
||||
# I believe this only works with GNU ld [pere 2001-04-16]
|
||||
my_cv_LINKER_RPATH="-Wl,-rpath,"
|
||||
;;
|
||||
solaris*)
|
||||
my_cv_LINKER_RPATH="-R "
|
||||
;;
|
||||
esac
|
||||
])
|
||||
LINKER_RPATH="$my_cv_LINKER_RPATH"],
|
||||
[AC_MSG_RESULT([no])
|
||||
LINKER_RPATH=])
|
||||
AC_SUBST(LINKER_RPATH)dnl
|
||||
])
|
||||
|
||||
|
|
|
@ -971,6 +971,7 @@ enable_maintainer_mode
|
|||
with_docdir
|
||||
enable_dependency_tracking
|
||||
enable_warnings
|
||||
enable_rpath
|
||||
enable_pthread
|
||||
enable_locking
|
||||
with_group
|
||||
|
@ -1652,6 +1653,7 @@ Optional Features:
|
|||
--disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors
|
||||
--enable-warnings turn on tons of compiler warnings (GCC only)
|
||||
--enable-rpath use runtime library search path [default=yes]
|
||||
--enable-pthread use pthread instead of fork (default=yes for MacOS
|
||||
X, no for everything else)
|
||||
--enable-locking activate device locking (default=yes, but only used
|
||||
|
@ -5183,26 +5185,44 @@ fi # ac_cv_c_compiler_gnu
|
|||
;;
|
||||
esac
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking linker parameter to set runtime link path" >&5
|
||||
{ $as_echo "$as_me:$LINENO: checking whether runtime link path should be used" >&5
|
||||
$as_echo_n "checking whether runtime link path should be used... " >&6; }
|
||||
# Check whether --enable-rpath was given.
|
||||
if test "${enable_rpath+set}" = set; then
|
||||
enableval=$enable_rpath;
|
||||
fi
|
||||
|
||||
|
||||
LINKER_RPATH=
|
||||
if test "x$enable_rpath" != xno; then
|
||||
{ $as_echo "$as_me:$LINENO: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
{ $as_echo "$as_me:$LINENO: checking linker parameter to set runtime link path" >&5
|
||||
$as_echo_n "checking linker parameter to set runtime link path... " >&6; }
|
||||
if test "${my_cv_LINKER_RPATH+set}" = set; then
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
my_cv_LINKER_RPATH=
|
||||
case "$host_os" in
|
||||
linux* | freebsd* | netbsd* | openbsd* | irix*)
|
||||
# I believe this only works with GNU ld [pere 2001-04-16]
|
||||
my_cv_LINKER_RPATH="-Wl,-rpath,"
|
||||
;;
|
||||
solaris*)
|
||||
my_cv_LINKER_RPATH="-R "
|
||||
;;
|
||||
esac
|
||||
case "$host_os" in
|
||||
linux* | freebsd* | netbsd* | openbsd* | irix*)
|
||||
# I believe this only works with GNU ld [pere 2001-04-16]
|
||||
my_cv_LINKER_RPATH="-Wl,-rpath,"
|
||||
;;
|
||||
solaris*)
|
||||
my_cv_LINKER_RPATH="-R "
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:$LINENO: result: $my_cv_LINKER_RPATH" >&5
|
||||
$as_echo "$my_cv_LINKER_RPATH" >&6; }
|
||||
LINKER_RPATH="$my_cv_LINKER_RPATH"
|
||||
LINKER_RPATH="$my_cv_LINKER_RPATH"
|
||||
else
|
||||
{ $as_echo "$as_me:$LINENO: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
LINKER_RPATH=
|
||||
fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
|
||||
|
@ -18840,7 +18860,7 @@ ia64-*-hpux*)
|
|||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 18843 "configure"' > conftest.$ac_ext
|
||||
echo '#line 18863 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
|
@ -21739,11 +21759,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:21742: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:21762: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:21746: \$? = $ac_status" >&5
|
||||
echo "$as_me:21766: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -22029,11 +22049,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:22032: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:22052: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:22036: \$? = $ac_status" >&5
|
||||
echo "$as_me:22056: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -22133,11 +22153,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:22136: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:22156: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:22140: \$? = $ac_status" >&5
|
||||
echo "$as_me:22160: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -24535,7 +24555,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 24538 "configure"
|
||||
#line 24558 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -24635,7 +24655,7 @@ else
|
|||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 24638 "configure"
|
||||
#line 24658 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -27048,11 +27068,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:27051: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:27071: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:27055: \$? = $ac_status" >&5
|
||||
echo "$as_me:27075: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -27152,11 +27172,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:27155: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:27175: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:27159: \$? = $ac_status" >&5
|
||||
echo "$as_me:27179: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -28737,11 +28757,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:28740: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:28760: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:28744: \$? = $ac_status" >&5
|
||||
echo "$as_me:28764: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -28841,11 +28861,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:28844: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:28864: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:28848: \$? = $ac_status" >&5
|
||||
echo "$as_me:28868: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
@ -31062,11 +31082,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:31065: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:31085: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:31069: \$? = $ac_status" >&5
|
||||
echo "$as_me:31089: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -31352,11 +31372,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:31355: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:31375: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:31359: \$? = $ac_status" >&5
|
||||
echo "$as_me:31379: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings other than the usual output.
|
||||
|
@ -31456,11 +31476,11 @@ else
|
|||
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:31459: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:31479: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:31463: \$? = $ac_status" >&5
|
||||
echo "$as_me:31483: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
|
|
Ładowanie…
Reference in New Issue