diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-20 23:14:07 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-20 23:14:07 +0200 |
commit | c59fc9e953db9723b34eebe96c3ad2cef893c4bb (patch) | |
tree | bd9c6dd8e8343d17c80a1a5d6762e1f99f3367b7 /aclocal.m4 | |
parent | 654611b4d68129954697bb94d49c671e164ec938 (diff) | |
parent | 784b06732b24f3079e88e5be4284b645aa715512 (diff) |
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Conflicts:
configure
configure.in
hurd/ctty-input.c
hurd/ctty-output.c
hurd/hurd/signal.h
hurd/hurdexec.c
hurd/hurdmsg.c
hurd/hurdsig.c
hurd/hurdsocket.h
socket/recvmmsg.c
socket/sendmmsg.c
sysdeps/mach/hurd/i386/sigreturn.c
sysdeps/mach/hurd/i386/trampoline.c
sysdeps/mach/hurd/pipe.c
sysdeps/mach/hurd/recvmsg.c
sysdeps/mach/hurd/sendmsg.c
sysdeps/mach/hurd/sigaction.c
sysdeps/mach/hurd/sigpending.c
sysdeps/mach/hurd/sigprocmask.c
sysdeps/mach/hurd/sigsuspend.c
sysdeps/mach/hurd/sigwait.c
sysdeps/mach/hurd/socketpair.c
sysdeps/mach/hurd/tls.h
sysdeps/unix/sysv/linux/recvmmsg.c
sysdeps/unix/sysv/linux/sendmmsg.c
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 982d90e11c..7292fc87db 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -166,3 +166,79 @@ then done AC_MSG_RESULT() fi]) + +# These two macros are taken from GCC's config/acx.m4. +dnl Support the --with-pkgversion configure option. +dnl ACX_PKGVERSION(default-pkgversion) +AC_DEFUN([ACX_PKGVERSION],[ + AC_ARG_WITH(pkgversion, + AS_HELP_STRING([--with-pkgversion=PKG], + [Use PKG in the version string in place of "$1"]), + [case "$withval" in + yes) AC_MSG_ERROR([package version not specified]) ;; + no) PKGVERSION= ;; + *) PKGVERSION="($withval) " ;; + esac], + PKGVERSION="($1) " + ) + PKGVERSION_TEXI=`echo "$PKGVERSION" | sed 's/@/@@/g'` + AC_SUBST(PKGVERSION) + AC_SUBST(PKGVERSION_TEXI) +]) + +dnl Support the --with-bugurl configure option. +dnl ACX_BUGURL(default-bugurl) +AC_DEFUN([ACX_BUGURL],[ + AC_ARG_WITH(bugurl, + AS_HELP_STRING([--with-bugurl=URL], + [Direct users to URL to report a bug]), + [case "$withval" in + yes) AC_MSG_ERROR([bug URL not specified]) ;; + no) BUGURL= + ;; + *) BUGURL="$withval" + ;; + esac], + BUGURL="$1" + ) + case ${BUGURL} in + "") + REPORT_BUGS_TO= + REPORT_BUGS_TEXI= + ;; + *) + REPORT_BUGS_TO="<$BUGURL>" + REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} + ;; + esac; + AC_SUBST(REPORT_BUGS_TO) + AC_SUBST(REPORT_BUGS_TEXI) +]) + +dnl Check linker option support. +dnl LIBC_LINKER_FEATURE([ld_option], [cc_option], [action-if-true], [action-if-false]) +AC_DEFUN([LIBC_LINKER_FEATURE], +[AC_MSG_CHECKING([for linker that supports $1]) +libc_linker_feature=no +if test x"$gnu_ld" = x"yes"; then + libc_linker_check=`$LD -v --help 2>/dev/null | grep "\$1"` + if test -n "$libc_linker_check"; then + cat > conftest.c <<EOF +int _start (void) { return 42; } +EOF + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + $2 -nostdlib -nostartfiles + -fPIC -shared -o conftest.so conftest.c + 1>&AS_MESSAGE_LOG_FD]) + then + libc_linker_feature=yes + fi + rm -f conftest* + fi +fi +if test $libc_linker_feature = yes; then + $3 +else + $4 +fi +AC_MSG_RESULT($libc_linker_feature)]) |