mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
9c68fb1895
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@10496 a592a061-630c-0410-9148-cb99ea01b6c8
45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
dnl this is used by the macro blow to general a proper config.h.in entry
|
|
m4_define([LYX_AH_CHECK_DECL],
|
|
[AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_$1),
|
|
[Define if you have the prototype for function `$1'])])
|
|
|
|
dnl Check things are declared in headers to avoid errors or warnings.
|
|
dnl Called like LYX_CHECK_DECL(function, header1 header2...)
|
|
dnl Defines HAVE_DECL_{FUNCTION}
|
|
AC_DEFUN([LYX_CHECK_DECL],
|
|
[LYX_AH_CHECK_DECL($1)
|
|
for ac_header in $2
|
|
do
|
|
AC_MSG_CHECKING([if $1 is declared by header $ac_header])
|
|
AC_EGREP_HEADER($1, $ac_header,
|
|
[AC_MSG_RESULT(yes)
|
|
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_DECL_$1))
|
|
break],
|
|
[AC_MSG_RESULT(no)])
|
|
done])
|
|
|
|
|
|
dnl Set VAR to the canonically resolved absolute equivalent of PATHNAME,
|
|
dnl (which may be a relative path, and need not refer to any existing
|
|
dnl entity).
|
|
|
|
dnl On Win32-MSYS build hosts, the returned path is resolved to its true
|
|
dnl native Win32 path name, (but with slashes, not backslashes).
|
|
|
|
dnl On any other system, it is simply the result which would be obtained
|
|
dnl if PATHNAME represented an existing directory, and the pwd command was
|
|
dnl executed in that directory.
|
|
AC_DEFUN([MSYS_AC_CANONICAL_PATH],
|
|
[ac_dir="$2"
|
|
( exec 2>/dev/null; cd / && pwd -W ) | grep ':' >/dev/null &&
|
|
ac_pwd_w="pwd -W" || ac_pwd_w=pwd
|
|
until ac_val=`exec 2>/dev/null; cd "$ac_dir" && $ac_pwd_w`
|
|
do
|
|
ac_dir=`AS_DIRNAME(["$ac_dir"])`
|
|
done
|
|
ac_dir=`echo "$ac_dir" | sed 's?^[[./]]*??'`
|
|
ac_val=`echo "$ac_val" | sed 's?/*$[]??'`
|
|
$1=`echo "$2" | sed "s?^[[./]]*$ac_dir/*?$ac_val/?"'
|
|
s?/*$[]??'`
|
|
])
|