x_ac_aix.m4 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. ##*****************************************************************************
  2. # AUTHOR:
  3. # Morris Jette <jette@llnl.gov>
  4. #
  5. # SYNOPSIS:
  6. # X_AC_AIX
  7. #
  8. # DESCRIPTION:
  9. # Check for AIX operating system and sets parameters accordingly,
  10. # also define HAVE_AIX and HAVE_LARGEFILE if appropriate.
  11. # NOTE: AC_SYS_LARGEFILE may fail on AIX due to inconstencies within
  12. # installed gcc header files.
  13. ##*****************************************************************************
  14. AC_DEFUN([X_AC_AIX],
  15. [
  16. case "$host" in
  17. *-*-aix*) LDFLAGS="$LDFLAGS -Wl,-brtl" # permit run time linking
  18. LIB_LDFLAGS="$LDFLAGS -Wl,-G -Wl,-bnoentry -Wl,-bgcbypass:1000 -Wl,-bexpfull"
  19. SO_LDFLAGS=" $LDFLAGS -Wl,-G -Wl,-bnoentry -Wl,-bgcbypass:1000 -Wl,-bexpfull"
  20. if test "$OBJECT_MODE" = "64"; then
  21. CFLAGS="-maix64 $CFLAGS"
  22. CMD_LDFLAGS="$LDFLAGS -Wl,-bgcbypass:1000 -Wl,-bexpfull" # keep all common functions
  23. else
  24. CFLAGS="-maix32 $CFLAGS"
  25. CMD_LDFLAGS="$LDFLAGS -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000" # keep all common functions
  26. fi
  27. ac_have_aix="yes"
  28. ac_with_readline="no"
  29. AC_DEFINE(HAVE_AIX, 1, [Define to 1 for AIX operating system])
  30. ;;
  31. *) ac_have_aix="no"
  32. ;;
  33. esac
  34. AC_SUBST(CMD_LDFLAGS)
  35. AC_SUBST(LIB_LDFLAGS)
  36. AC_SUBST(SO_LDFLAGS)
  37. AM_CONDITIONAL(HAVE_AIX, test "x$ac_have_aix" = "xyes")
  38. AC_SUBST(HAVE_AIX, "$ac_have_aix")
  39. if test "x$ac_have_aix" = "xyes"; then
  40. AC_ARG_WITH(proctrack,
  41. AS_HELP_STRING(--with-proctrack=PATH,Specify path to proctrack sources),
  42. [ PROCTRACKDIR="$withval" ]
  43. )
  44. if test -f "$PROCTRACKDIR/lib/proctrackext.exp"; then
  45. PROCTRACKDIR="$PROCTRACKDIR/lib"
  46. AC_SUBST(PROCTRACKDIR)
  47. CPPFLAGS="-I$PROCTRACKDIR/include $CPPFLAGS"
  48. AC_CHECK_HEADERS(proctrack.h)
  49. ac_have_aix_proctrack="yes"
  50. elif test -f "$prefix/lib/proctrackext.exp"; then
  51. PROCTRACKDIR="$prefix/lib"
  52. AC_SUBST(PROCTRACKDIR)
  53. CPPFLAGS="$CPPFLAGS -I$prefix/include"
  54. AC_CHECK_HEADERS(proctrack.h)
  55. ac_have_aix_proctrack="yes"
  56. else
  57. AC_MSG_WARN([proctrackext.exp is required for AIX proctrack support, specify location with --with-proctrack])
  58. ac_have_aix_proctrack="no"
  59. fi
  60. else
  61. ac_have_aix_proctrack="no"
  62. AC_SYS_LARGEFILE
  63. fi
  64. AM_CONDITIONAL(HAVE_AIX_PROCTRACK, test "x$ac_have_aix_proctrack" = "xyes")
  65. ])