136 lines (110 with data), 4.1 kB
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(omctools, 1.0.2)
AM_INIT_AUTOMAKE(omctools, 1.0.2)
AC_CONFIG_SRCDIR([cimtester/src/getInstanceTest.cpp])
AC_CONFIG_HEADER([config.h])
AC_PROG_LIBTOOL
AC_PREFIX_DEFAULT(/usr)
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PATH_PROG(RM, rm, rm)
AC_PATH_PROG(MV, mv, mv)
AC_PATH_PROG(CP, cp, cp)
DEBUG_FLAGS="-DDEBUG -g" # Additional debugging flags.
OPT_FLAGS=" -DNDEBUG -O2" # Additional optimization flags.
##NOTE: whereever CXXFLAGS is used, we need to also use CPPFLAGS, for the AC_CHECK_HEADERS -
## It now uses compile (primarily) but still uses pre-processor for interim transition / backward compatibility
## pre-processor needs the CPPFLAGS
#######################################################################
# Process additional search dirs if specified
AC_ARG_WITH(search-dir,
[ --with-search-dir=PATH Specify an additional directory to look for include/ and lib/ sub dirs ],
[
if test "x$withval" != "xno" ; then
CXXFLAGS="$CXXFLAGS -I$withval/include"
CPPFLAGS="$CPPFLAGS -I$withval/include"
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
fi
]
)
#######################################################################
# Set the debug flag if specified
AC_ARG_ENABLE(debug-mode,
[--enable-debug-mode Enable debugging mode],
[
AC_DEFINE(DEBUG, 1, "Debugging flag.")
CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS"
CPPFLAGS="$CPPFLAGS $DEBUG_FLAGS"
CFLAGS=" $CFLAGS $DEBUG_FLAGS"
LDFLAGS=" $LDFLAGS $DEBUG_FLAGS"
],[
CXXFLAGS="$CXXFLAGS $OPT_FLAGS"
CPPFLAGS="$CPPFLAGS $OPT_FLAGS"
CFLAGS=" $CFLAGS $OPT_FLAGS"
LDFLAGS=" $LDFLAGS $OPT_FLAGS"
]
)
#######################################################################
AC_ARG_WITH(openwbem-dir,
[ --with-openwbem-dir=PATH Specify an additional directory to look for openwbem include/ and lib/ sub dirs ],
[
if test "x$withval" != "xno" ; then
CXXFLAGS="$CXXFLAGS -I$withval/include"
CPPFLAGS="$CPPFLAGS -I$withval/include"
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
fi
]
)
#####################################################
# Set the location of the sysconf dir
if test "x$sysconfdir" != "x\${prefix}/etc"; then
tempDir=$sysconfdir
else
if test "x$prefix" != "xNONE"; then
tempDir=${prefix}/etc
else
tempDir=${ac_default_prefix}/etc
fi
fi
#####################################################
# Checks for libraries.
# Checks for two basic and common openwbem libraries
AC_CHECK_LIB([owcimomcommon], [main],[LIBS="$LIBS"],[AC_MSG_ERROR(Must have openwbem-devel or build will fail)])
AC_CHECK_LIB([owclient], [main], [LIBS="$LIBS"], [AC_MSG_ERROR(Must have openwbem-devel or build will fail)])
# Checks for header files.
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([openwbem/OW_config.h openssl/crypto.h fcntl.h stdlib.h string.h unistd.h sys/time.h sys/param.h],,[AC_MSG_ERROR(Missing headers: likely won't compile)])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_HEADER_TIME
AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_CLOSEDIR_VOID
AC_REPLACE_FNMATCH
AC_FUNC_FORK
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_CHOWN
AC_FUNC_SETVBUF_REVERSED
AC_FUNC_STAT
AC_FUNC_STRERROR_R
AC_CHECK_FUNCS([gettimeofday memset regcomp strchr strdup strerror strstr strtol strtoul uname])
AC_CONFIG_FILES([Makefile
cimtester/Makefile
cimtester/src/Makefile
provtest/Makefile
provtest/src/Makefile
yawn/Makefile])
AC_OUTPUT