update to automake 1.4/autoconf 2.13
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5460 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -10,12 +10,10 @@ AC_TRY_LINK([
|
||||
#include <glob.h>],[
|
||||
glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE, NULL, NULL);
|
||||
],:,ac_cv_func_glob_working=no,:))
|
||||
: << END
|
||||
@@@funcs="$funcs glob"@@@
|
||||
END
|
||||
|
||||
if test "$ac_cv_func_glob_working" = yes; then
|
||||
foo=HAVE_GLOB
|
||||
AC_DEFINE_UNQUOTED($foo)
|
||||
AC_DEFINE(HAVE_GLOB, 1, [define if you have a glob() that groks
|
||||
GLOB_BRACE, GLOB_NOCHECK, GLOB_QUOTE, and GLOB_TILDE])
|
||||
fi
|
||||
if test "$ac_cv_func_glob_working" = yes; then
|
||||
AC_NEED_PROTO([#include <stdio.h>
|
||||
|
@@ -14,12 +14,9 @@ changequote([,])dnl
|
||||
snprintf(foo, 2, "12");
|
||||
return strcmp(foo, "1");
|
||||
}],:,ac_cv_func_snprintf_working=no,:))
|
||||
: << END
|
||||
@@@funcs="$funcs snprintf"@@@
|
||||
END
|
||||
|
||||
if test "$ac_cv_func_snprintf_working" = yes; then
|
||||
foo=HAVE_SNPRINTF
|
||||
AC_DEFINE_UNQUOTED($foo)
|
||||
AC_DEFINE_UNQUOTED(HAVE_SNPRINTF, 1, [define if you have a working snprintf])
|
||||
fi
|
||||
if test "$ac_cv_func_snprintf_working" = yes; then
|
||||
AC_NEED_PROTO([#include <stdio.h>],snprintf)
|
||||
@@ -51,12 +48,9 @@ int main()
|
||||
{
|
||||
return foo(0, "12");
|
||||
}],:,ac_cv_func_vsnprintf_working=no,:))
|
||||
: << END
|
||||
@@@funcs="$funcs vsnprintf"@@@
|
||||
END
|
||||
|
||||
if test "$ac_cv_func_vsnprintf_working" = yes; then
|
||||
foo=HAVE_VSNPRINTF
|
||||
AC_DEFINE_UNQUOTED($foo)
|
||||
AC_DEFINE_UNQUOTED(HAVE_VSNPRINTF, 1, [define if you have a working vsnprintf])
|
||||
fi
|
||||
if test "$ac_cv_func_vsnprintf_working" = yes; then
|
||||
AC_NEED_PROTO([#include <stdio.h>],vsnprintf)
|
||||
|
@@ -24,7 +24,7 @@ foo(void)
|
||||
ac_cv___attribute__=yes,
|
||||
ac_cv___attribute__=no)])
|
||||
if test "$ac_cv___attribute__" = "yes"; then
|
||||
AC_DEFINE(HAVE___ATTRIBUTE__)
|
||||
AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__])
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv___attribute__)
|
||||
])
|
||||
|
@@ -26,7 +26,7 @@ ac_cv___function__=yes,
|
||||
ac_cv___function__=no,
|
||||
ac_cv___function__=no)])
|
||||
if test "$ac_cv___function__" = "yes"; then
|
||||
AC_DEFINE(HAVE___FUNCTION__)
|
||||
AC_DEFINE(HAVE___FUNCTION__, 1, [define if your compiler has __FUNCTION__])
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv___function__)
|
||||
])
|
||||
|
@@ -15,16 +15,11 @@ eval "ac_cv_var_$2_declaration=no",
|
||||
eval "ac_cv_var_$2_declaration=yes")
|
||||
])
|
||||
|
||||
ac_tr_var=[HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION]
|
||||
|
||||
define([foo], [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION])
|
||||
: << END
|
||||
@@@syms="$syms foo"@@@
|
||||
END
|
||||
undefine([foo])
|
||||
define(foo, [HAVE_]translit($2, [a-z], [A-Z])[_DECLARATION])
|
||||
|
||||
AC_MSG_RESULT($ac_cv_var_$2_declaration)
|
||||
if eval "test \"\$ac_cv_var_$2_declaration\" = yes"; then
|
||||
AC_DEFINE_UNQUOTED($ac_tr_var)
|
||||
AC_DEFINE(foo, 1, [define if your system declares $2])
|
||||
fi
|
||||
undef(foo)
|
||||
])
|
||||
|
@@ -18,6 +18,6 @@ changequote([,]), [#include <sys/types.h>
|
||||
$3], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
|
||||
AC_MSG_RESULT($ac_cv_type_$1)
|
||||
if test $ac_cv_type_$1 = no; then
|
||||
AC_DEFINE($1, $2)
|
||||
AC_DEFINE($1, $2, [Define this to what the type $1 should be.])
|
||||
fi
|
||||
])
|
||||
|
@@ -9,17 +9,12 @@ int foo() { return $2; }],
|
||||
[foo()],
|
||||
ac_cv_var_$2=yes, ac_cv_var_$2=no)
|
||||
])
|
||||
eval "ac_tr_var=[HAVE_]translit($2,[a-z],[A-Z])"
|
||||
|
||||
define([foo], [HAVE_]translit($2, [a-z], [A-Z]))
|
||||
: << END
|
||||
@@@syms="$syms foo"@@@
|
||||
END
|
||||
undefine([foo])
|
||||
|
||||
AC_MSG_RESULT(`eval echo \\$ac_cv_var_$2`)
|
||||
if test `eval echo \\$ac_cv_var_$2` = yes; then
|
||||
AC_DEFINE_UNQUOTED($ac_tr_var)
|
||||
AC_DEFINE_UNQUOTED(foo, 1, [define if you have $2])
|
||||
AC_CHECK_DECLARATION([$1],[$2])
|
||||
fi
|
||||
undefine([foo])
|
||||
])
|
||||
|
@@ -1,30 +1,18 @@
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl check for fields in a structure
|
||||
dnl
|
||||
dnl Check if a particular struct has a particular field
|
||||
dnl
|
||||
dnl AC_HAVE_STRUCT_FIELD(struct, field, headers)
|
||||
|
||||
dnl AC_HAVE_STRUCT_FIELD(includes, struct, type, field)
|
||||
AC_DEFUN(AC_HAVE_STRUCT_FIELD, [
|
||||
AC_MSG_CHECKING([if $2 has a field $4])
|
||||
AC_CACHE_VAL(ac_cv_struct_$2_$4, [
|
||||
AC_TRY_COMPILE([$1],
|
||||
[struct $2 foo; $3 bar = foo.$4; ],
|
||||
eval "ac_cv_struct_$2_$4=yes",
|
||||
eval "ac_cv_struct_$2_$4=no")
|
||||
])
|
||||
changequote(, )dnl
|
||||
eval "ac_tr_var=HAVE_STRUCT_[]upcase($2)_[]upcase($4)"
|
||||
changequote([, ])dnl
|
||||
|
||||
define([foo], [[HAVE_STRUCT_]translit($2, [a-z], [A-Z])[_]translit($4, [a-z], [A-Z])])
|
||||
: << END
|
||||
@@@syms="$syms foo"@@@
|
||||
END
|
||||
undefine([foo])
|
||||
|
||||
AC_MSG_RESULT($ac_cv_struct_$2_$4)
|
||||
if eval "test \"\$ac_cv_struct_$2_$4\" = yes"; then
|
||||
AC_DEFINE_UNQUOTED($ac_tr_var)
|
||||
AC_CACHE_CHECK([for $2 in $1], ac_cv_type_$1_$2,[
|
||||
AC_TRY_COMPILE([$3],[$1 x; x.$2;],
|
||||
ac_cv_type_$1_$2=yes,
|
||||
ac_cv_type_$1_$2=no)])
|
||||
if test "$ac_cv_type_$1_$2" = yes; then
|
||||
define(foo, [HAVE_STRUCT_]translit($1_$2, [a-z ], [A-Z_]))
|
||||
AC_DEFINE(foo, 1, [Define if $1 has field $2.])
|
||||
undefine(foo)
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_type_$1_$2)
|
||||
])
|
||||
|
@@ -17,6 +17,6 @@ ac_cv_struct_spwd=no)
|
||||
AC_MSG_RESULT($ac_cv_struct_spwd)
|
||||
|
||||
if test "$ac_cv_struct_spwd" = "yes"; then
|
||||
AC_DEFINE(HAVE_STRUCT_SPWD)
|
||||
AC_DEFINE(HAVE_STRUCT_SPWD, 1, [define if you have struct spwd])
|
||||
fi
|
||||
])
|
||||
|
@@ -17,9 +17,11 @@ $i, ac_cv_struct_winsize=yes; break)dnl
|
||||
done
|
||||
])
|
||||
if test "$ac_cv_struct_winsize" = "yes"; then
|
||||
AC_DEFINE(HAVE_STRUCT_WINSIZE, 1)dnl
|
||||
AC_DEFINE(HAVE_STRUCT_WINSIZE, 1, [define if struct winsize is declared in sys/termios.h])
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_struct_winsize)
|
||||
AC_EGREP_HEADER(ws_xpixel, termios.h, AC_DEFINE(HAVE_WS_XPIXEL))
|
||||
AC_EGREP_HEADER(ws_ypixel, termios.h, AC_DEFINE(HAVE_WS_YPIXEL))
|
||||
AC_EGREP_HEADER(ws_xpixel, termios.h,
|
||||
AC_DEFINE(HAVE_WS_XPIXEL, 1, [define if struct winsize has ws_xpixel]))
|
||||
AC_EGREP_HEADER(ws_ypixel, termios.h,
|
||||
AC_DEFINE(HAVE_WS_YPIXEL, 1, [define if struct winsize has ws_ypixel]))
|
||||
])
|
||||
|
@@ -1,30 +0,0 @@
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl
|
||||
dnl Check if we need the declaration of a variable
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_NEED_DECLARATION, [
|
||||
AC_MSG_CHECKING([if $3 needs a declaration])
|
||||
AC_CACHE_VAL(ac_cv_var_$3_declaration, [
|
||||
AC_TRY_COMPILE([$1],
|
||||
[$2 foo = ($2)$3; ],
|
||||
eval "ac_cv_var_$3_declaration=no",
|
||||
eval "ac_cv_var_$3_declaration=yes")
|
||||
])
|
||||
|
||||
changequote(, )dnl
|
||||
eval "ac_tr_var=NEED_[]upcase($3)[]_DECLARATION"
|
||||
changequote([, ])dnl
|
||||
|
||||
define([foo], [NEED_]translit($3, [a-z], [A-Z])[_DECLARATION])
|
||||
: << END
|
||||
@@@syms="$syms foo"@@@
|
||||
END
|
||||
undefine([foo])
|
||||
|
||||
AC_MSG_RESULT($ac_cv_var_$3_declaration)
|
||||
if eval "test \"\$ac_cv_var_$3_declaration\" = yes"; then
|
||||
AC_DEFINE_UNQUOTED($ac_tr_var)
|
||||
fi
|
||||
])
|
@@ -7,6 +7,7 @@ dnl
|
||||
dnl AC_NEED_PROTO(includes, function)
|
||||
|
||||
AC_DEFUN(AC_NEED_PROTO, [
|
||||
if test "$ac_cv_func_$2+set" != set -o "$ac_cv_func_$2" = yes; then
|
||||
AC_CACHE_CHECK([if $2 needs a prototype], ac_cv_func_$2_noproto,
|
||||
AC_TRY_COMPILE([$1],
|
||||
[struct foo { int foo; } xx;
|
||||
@@ -17,10 +18,8 @@ eval "ac_cv_func_$2_noproto=yes",
|
||||
eval "ac_cv_func_$2_noproto=no"))
|
||||
define([foo], [NEED_]translit($2, [a-z], [A-Z])[_PROTO])
|
||||
if test "$ac_cv_func_$2_noproto" = yes; then
|
||||
AC_DEFINE(foo)
|
||||
AC_DEFINE(foo, 1, [define if the system is missing a prototype for $2()])
|
||||
fi
|
||||
: << END
|
||||
@@@syms="$syms foo"@@@
|
||||
END
|
||||
undefine([foo])
|
||||
fi
|
||||
])
|
||||
|
@@ -15,10 +15,9 @@ eval "ac_cv_func_$2_proto_compat=yes",
|
||||
eval "ac_cv_func_$2_proto_compat=no"))
|
||||
define([foo], translit($2, [a-z], [A-Z])[_PROTO_COMPATIBLE])
|
||||
if test "$ac_cv_func_$2_proto_compat" = yes; then
|
||||
AC_DEFINE(foo)
|
||||
AC_DEFINE(foo, 1, [define if prototype of openlog is compatible with
|
||||
$3])
|
||||
)
|
||||
fi
|
||||
: << END
|
||||
@@@syms="$syms foo"@@@
|
||||
END
|
||||
undefine([foo])
|
||||
])
|
||||
|
@@ -28,10 +28,6 @@ fi]
|
||||
)
|
||||
|
||||
define([foo], translit($1, [a-z], [A-Z]))
|
||||
: << END
|
||||
@@@syms="$syms foo"@@@
|
||||
END
|
||||
|
||||
if test -n "$with_$1" -o -n "$5"; then
|
||||
dnl AC_DEFINE([foo])
|
||||
if test -n "$with_$1" -a "$with_$1" != "yes"; then
|
||||
@@ -94,7 +90,7 @@ dnl Try to find lib
|
||||
fi
|
||||
if test -n "$$1_include" -o -n "$$1_lib"; then
|
||||
AC_MSG_RESULT([headers $$1_include, libraries $$1_lib])
|
||||
AC_DEFINE_UNQUOTED(foo)
|
||||
AC_DEFINE_UNQUOTED(foo, 1, [Define if you have the $1 package])
|
||||
if test "$with_$1" = "" -a "$5"; then
|
||||
with_$1="$5"
|
||||
fi
|
||||
|
@@ -1,17 +0,0 @@
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl test for mode_t
|
||||
|
||||
AC_DEFUN(AC_TYPE_MODE_T,
|
||||
[AC_MSG_CHECKING(for mode_t)
|
||||
AC_CACHE_VAL(ac_cv_type_mode_t,
|
||||
AC_TRY_COMPILE(
|
||||
[#include <sys/types.h>],
|
||||
[mode_t foo = 1;],
|
||||
ac_cv_type_mode_t=yes,
|
||||
ac_cv_type_mode_t=no))
|
||||
if test "$ac_cv_type_mode_t" = no; then
|
||||
AC_DEFINE(mode_t, unsigned short)dnl
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_type_mode_t)
|
||||
])
|
@@ -1,17 +0,0 @@
|
||||
dnl $Id$
|
||||
dnl
|
||||
dnl test for sig_atomic_t
|
||||
|
||||
AC_DEFUN(AC_TYPE_SIG_ATOMIC_T,
|
||||
[AC_MSG_CHECKING(for sig_atomic_t)
|
||||
AC_CACHE_VAL(ac_cv_type_sig_atomic_t,
|
||||
AC_TRY_COMPILE(
|
||||
[#include <signal.h>],
|
||||
[sig_atomic_t foo = 1;],
|
||||
ac_cv_type_sig_atomic_t=yes,
|
||||
ac_cv_type_sig_atomic_t=no))
|
||||
if test "$ac_cv_type_sig_atomic_t" = no; then
|
||||
AC_DEFINE(sig_atomic_t, int)dnl
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_type_sig_atomic_t)
|
||||
])
|
Reference in New Issue
Block a user