2003-08-13 05:53:07 +04:00
dnl Copied from libtool.m4
AC_DEFUN(AC_PROG_LD_GNU,
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
ac_cv_prog_gnu_ld=yes
else
ac_cv_prog_gnu_ld=no
fi])
])
dnl Removes -I/usr/include/? from given variable
AC_DEFUN(CFLAGS_REMOVE_USR_INCLUDE,[
ac_new_flags=""
for i in [$]$1; do
case [$]i in
-I/usr/include|-I/usr/include/) ;;
*) ac_new_flags="[$]ac_new_flags [$]i" ;;
esac
done
$1=[$]ac_new_flags
])
2006-10-05 11:47:56 +04:00
dnl Removes '-L/usr/lib[/]', '-Wl,-rpath,/usr/lib[/]'
dnl and '-Wl,-rpath -Wl,/usr/lib[/]' from given variable
2003-08-13 05:53:07 +04:00
AC_DEFUN(LIB_REMOVE_USR_LIB,[
ac_new_flags=""
2006-10-05 11:47:56 +04:00
l=""
2003-08-13 05:53:07 +04:00
for i in [$]$1; do
2006-10-05 11:47:56 +04:00
case [$]l[$]i in
-L/usr/lib) ;;
-L/usr/lib/) ;;
2009-03-11 17:32:49 +03:00
-L/usr/lib64) ;;
-L/usr/lib64/) ;;
-Wl,-rpath,/usr/lib) l="";;
-Wl,-rpath,/usr/lib/) l="";;
-Wl,-rpath,/usr/lib64) l="";;
-Wl,-rpath,/usr/lib64/) l="";;
2006-10-05 11:47:56 +04:00
-Wl,-rpath) l=[$]i;;
-Wl,-rpath-Wl,/usr/lib) l="";;
-Wl,-rpath-Wl,/usr/lib/) l="";;
2009-03-11 17:32:49 +03:00
-Wl,-rpath-Wl,/usr/lib64) l="";;
-Wl,-rpath-Wl,/usr/lib64/) l="";;
2006-10-05 11:47:56 +04:00
*)
s=" "
if test x"[$]ac_new_flags" = x""; then
s="";
fi
if test x"[$]l" = x""; then
ac_new_flags="[$]ac_new_flags[$]s[$]i";
else
ac_new_flags="[$]ac_new_flags[$]s[$]l [$]i";
fi
l=""
;;
2003-08-13 05:53:07 +04:00
esac
done
$1=[$]ac_new_flags
])
2008-09-17 16:11:12 +04:00
m4_include(../lib/replace/libreplace.m4)
2006-09-05 19:21:12 +04:00
m4_include(build/m4/ax_cflags_gcc_option.m4)
m4_include(build/m4/ax_cflags_irix_option.m4)
2006-09-06 13:52:16 +04:00
m4_include(build/m4/public.m4)