1# -*- Autoconf -*- 2# Process this file with autoconf to produce a configure script. 3 4 5AC_PREREQ(2.57) 6AC_INIT(libsdp, 1.1.108, openib-general@openib.org) 7AC_CONFIG_SRCDIR([src/port.c]) 8AC_CONFIG_AUX_DIR(config) 9AM_CONFIG_HEADER(config.h) 10AM_INIT_AUTOMAKE(libsdp, 1.1.108) 11 12AC_CANONICAL_HOST 13AM_MAINTAINER_MODE 14 15AC_DISABLE_STATIC 16AC_PROG_LIBTOOL 17 18# Checks for programs. 19AC_PROG_CC 20AM_PROG_LEX 21AC_PROG_YACC 22 23# Checks for libraries. 24 25# Checks for header files. 26AC_HEADER_STDC 27AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdlib.h string.h sys/socket.h syslog.h unistd.h]) 28 29# Checks for typedefs, structures, and compiler characteristics. 30AC_C_CONST 31 32# Checks for library functions. 33AC_REPLACE_FNMATCH 34AC_PROG_GCC_TRADITIONAL 35AC_FUNC_MALLOC 36AC_FUNC_VPRINTF 37AC_CHECK_FUNCS([dup2 memset socket strcasecmp strchr strdup strpbrk strrchr strtoul]) 38 39# check OS 40case "${host}" in 41i[[3456]]86-*-linux*) AC_DEFINE(LINUX_BUILD, 1, [OS is linux]) ac_cv_linux_build="yes" ;; 42sparc*-sun-solaris*) AC_DEFINE(SOLARIS_BUILD, 1, [OS is sparc solaris]) ac_cv_solaris_build="yes";; 43esac 44 45AM_CONDITIONAL(LINUX_BUILD, test "$ac_cv_linux_build" = "yes") 46AM_CONDITIONAL(SOLARIS_BUILD, test "$ac_cv_solaris_build" = "yes") 47 48# Check if we should build libsdp_sys 49AC_CACHE_CHECK(whether to build i386-specific libsdp_sys, ac_cv_libsdp_sys, 50 AC_TRY_COMPILE(,[ 51 #if !i386 52 #error Not i386 53 #endif 54 ], ac_cv_libsdp_sys="yes", ac_cv_libsdp_sys="no")) 55 56AM_CONDITIONAL(WANT_LIBSDP_SYS, test "$ac_cv_libsdp_sys" = "yes") 57 58AC_CONFIG_FILES([Makefile src/Makefile libsdp.spec]) 59AC_OUTPUT 60