view acinclude.m4 @ 2:7bf4a164d5bb default tip

fix bug: long_options have to be zero terminated
author Peter Meerwald <p.meerwald@bct-electronic.com>
date Fri, 20 Jul 2012 11:28:30 +0200
parents b8f7423e385c
children
line wrap: on
line source

dnl
dnl Add macros
dnl	JAPHAR_GREP_CFLAGS
dnl

dnl
dnl JAPHAR_GREP_CFLAGS(flag, cmd_if_missing, cmd_if_present)
dnl
dnl From Japhar.  Report changes to japhar@hungry.com
dnl
AC_DEFUN(JAPHAR_GREP_CFLAGS,
[case "$CFLAGS" in
"$1" | "$1 "* | *" $1" | *" $1 "* )
  ifelse($#, 3, [$3], [:])
  ;;
*)
  $2
  ;;
esac
])

AC_DEFUN(CHRPATH_LDRPATH_OPTION,
[AC_REQUIRE([AC_CANONICAL_TARGET])[]dnl
case "$target" in
	*-linux*)
		LDRPATH=-Wl,-rpath,
		;;
	*-*-irix*|*-*-osf*)
		LDRPATH="-rpath "
		;;
	*-*-hpux*)
		# Hm, this seem to set runpath on ia64, not rpath
		LDRPATH="-Wl,+b,"
		;;
	*-*-darwin*)
		# No idea how to add rpath/runpath on Darwin
		LDRPATH=""
		;;
	*)
		LDRPATH="-R "
		;;
esac
AC_SUBST(LDRPATH)
])

Repositories maintained by Peter Meerwald, pmeerw@pmeerw.net.