2001-02-13 16:46:19 +00:00
|
|
|
dnl
|
2004-04-03 21:22:55 +00:00
|
|
|
dnl $Id: aix.m4,v 1.9.6.1 2004/04/01 07:27:32 joda Exp $
|
2001-02-13 16:46:19 +00:00
|
|
|
dnl
|
|
|
|
|
2004-04-03 21:22:55 +00:00
|
|
|
AC_DEFUN([rk_AIX],[
|
2002-08-30 21:23:27 +00:00
|
|
|
|
2001-02-13 16:46:19 +00:00
|
|
|
aix=no
|
|
|
|
case "$host" in
|
|
|
|
*-*-aix3*)
|
|
|
|
aix=3
|
|
|
|
;;
|
2002-08-30 21:23:27 +00:00
|
|
|
*-*-aix4*|*-*-aix5*)
|
2001-02-13 16:46:19 +00:00
|
|
|
aix=4
|
|
|
|
;;
|
|
|
|
esac
|
2002-08-30 21:23:27 +00:00
|
|
|
|
2001-02-13 16:46:19 +00:00
|
|
|
AM_CONDITIONAL(AIX, test "$aix" != no)dnl
|
|
|
|
AM_CONDITIONAL(AIX4, test "$aix" = 4)
|
|
|
|
|
2002-08-30 21:23:27 +00:00
|
|
|
|
|
|
|
AC_ARG_ENABLE(dynamic-afs,
|
|
|
|
AC_HELP_STRING([--disable-dynamic-afs],
|
|
|
|
[do not use loaded AFS library with AIX]))
|
2001-02-13 16:46:19 +00:00
|
|
|
|
|
|
|
if test "$aix" != no; then
|
2002-08-30 21:23:27 +00:00
|
|
|
if test "$enable_dynamic_afs" != no; then
|
|
|
|
AC_REQUIRE([rk_DLOPEN])
|
|
|
|
if test "$ac_cv_func_dlopen" = no; then
|
|
|
|
AC_FIND_FUNC_NO_LIBS(loadquery, ld)
|
|
|
|
fi
|
|
|
|
if test "$ac_cv_func_dlopen" != no; then
|
|
|
|
AIX_EXTRA_KAFS='$(LIB_dlopen)'
|
|
|
|
elif test "$ac_cv_func_loadquery" != no; then
|
|
|
|
AIX_EXTRA_KAFS='$(LIB_loadquery)'
|
2001-02-13 16:46:19 +00:00
|
|
|
else
|
2002-08-30 21:23:27 +00:00
|
|
|
AC_MSG_NOTICE([not using dynloaded AFS library])
|
|
|
|
AIX_EXTRA_KAFS=
|
|
|
|
enable_dynamic_afs=no
|
2001-02-13 16:46:19 +00:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
AIX_EXTRA_KAFS=
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2002-08-30 21:23:27 +00:00
|
|
|
AM_CONDITIONAL(AIX_DYNAMIC_AFS, test "$enable_dynamic_afs" != no)dnl
|
2001-02-13 16:46:19 +00:00
|
|
|
AC_SUBST(AIX_EXTRA_KAFS)dnl
|
|
|
|
|
2002-08-30 21:23:27 +00:00
|
|
|
AH_BOTTOM([#if _AIX
|
|
|
|
#define _ALL_SOURCE
|
|
|
|
/* XXX this is gross, but kills about a gazillion warnings */
|
|
|
|
struct ether_addr;
|
|
|
|
struct sockaddr;
|
|
|
|
struct sockaddr_dl;
|
|
|
|
struct sockaddr_in;
|
|
|
|
#endif])
|
|
|
|
|
|
|
|
])
|