blob: 76a3ed797ebee2c5ca0fe01013116bf7d529195a [file] [log] [blame]
dnl Copyright (c) 2006, 2008 IBM Corporation, and others.
dnl All rights reserved. This program and the accompanying materials
dnl are made available under the terms of the Eclipse Public License v1.0
dnl which accompanies this distribution, and is available at
dnl http://www.eclipse.org/legal/epl-v10.html
dnl
dnl
AC_PREREQ(2.50)
AC_INIT(org.eclipse.ptp.ibmpe, [@buildVersion@])
AC_CONFIG_SRCDIR(src/ptp_ibmpe_proxy.c)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE
AC_CANONICAL_BUILD
dnl
dnl Eclipse adds version number to end of package when deploying via update site
dnl
VERSION="_$PACKAGE_VERSION"
if [ `expr "$VERSION" : "_@[^@]*@"` -gt 0 ]; then
VERSION=
fi
UTILS="../org.eclipse.ptp.utils"
if test ! -d $UTILS; then
UTILS="`echo ${UTILS}${VERSION}`"
if test ! -d $UTILS; then
AC_MSG_ERROR([utils directory not found])
fi
fi
PROXY="../org.eclipse.ptp.proxy"
if test ! -d $PROXY; then
PROXY="`echo ${PROXY}${VERSION}`"
if test ! -d $PROXY; then
AC_MSG_ERROR([proxy directory not found])
fi
fi
AC_ARG_WITH([LoadLeveler], AS_HELP_STRING([--without-LoadLeveler],
[disable support for LoadLeveler]),
[with_loadleveler=no], [with_loadleveler=yes])
if test "x$with_loadleveler" = "xyes" ; then
AC_ARG_WITH(ll-header, AC_HELP_STRING([--with-ll-header=DIR],
[local LoadLeveler header directory @<:@none@:>@]),
[llinclude=-I$withval], [llinclude=""])
lldir="$llinclude -I/opt/ibmll/LoadL/full/include -I/usr/lpp/LoadL/full/include"
fi
dnl
dnl Check for programs.
dnl
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_RANLIB
os=`uname -s`
if test "x$os" = "xAIX" ; then
CFLAGS="$CFLAGS -qinfo=gen -qcpluscmt"
else
CFLAGS="$CFLAGS -Wall"
fi
CFLAGS="$CFLAGS -I$UTILS/include -I$PROXY/include $lldir"
LIBS="$LIBS -L$UTILS -L$PROXY"
dnl
dnl Check for libraries.
dnl
AC_CHECK_LIB(utils, bitset_new)
AC_CHECK_LIB(proxysvr, proxy_svr_init)
dnl
dnl Check for header files.
dnl
AC_HEADER_STDC
if test "x$with_loadleveler" = "xyes" ; then
AC_CHECK_HEADERS([llapi.h], [CFLAGS="$CFLAGS -DHAVE_LLAPI_H"])
fi
dnl
dnl Check for types
dnl
AC_TYPE_SIGNAL
dnl
dnl Check for "poe" program
dnl
AC_PATH_PROG(POE, [poe], no)
if test "$ac_cv_path_POE" != no; then
AC_DEFINE_UNQUOTED(POE, "$ac_cv_path_POE", [Location of poe program])
else
AC_MSG_NOTICE([PE not installed, skipping...])
AS_EXIT
fi
AC_CONFIG_FILES([Makefile])
AC_OUTPUT