2 # Process this file with autoconf to produce a configure script.
6 AC_INIT(libsdp, 1.1.108, openib-general@openib.org)
7 AC_CONFIG_SRCDIR([src/port.c])
8 AC_CONFIG_AUX_DIR(config)
9 AM_CONFIG_HEADER(config.h)
10 AM_INIT_AUTOMAKE(libsdp, 1.1.108)
18 # Checks for programs.
23 # Checks for libraries.
25 # Checks for header files.
27 AC_CHECK_HEADERS([arpa/inet.h netinet/in.h stdlib.h string.h sys/socket.h syslog.h unistd.h])
29 # Checks for typedefs, structures, and compiler characteristics.
32 # Checks for library functions.
34 AC_PROG_GCC_TRADITIONAL
37 AC_CHECK_FUNCS([dup2 memset socket strcasecmp strchr strdup strpbrk strrchr strtoul])
41 i[[3456]]86-*-linux*) AC_DEFINE(LINUX_BUILD, 1, [OS is linux]) ac_cv_linux_build="yes" ;;
42 sparc*-sun-solaris*) AC_DEFINE(SOLARIS_BUILD, 1, [OS is sparc solaris]) ac_cv_solaris_build="yes";;
45 AM_CONDITIONAL(LINUX_BUILD, test "$ac_cv_linux_build" = "yes")
46 AM_CONDITIONAL(SOLARIS_BUILD, test "$ac_cv_solaris_build" = "yes")
48 # Check if we should build libsdp_sys
49 AC_CACHE_CHECK(whether to build i386-specific libsdp_sys, ac_cv_libsdp_sys,
54 ], ac_cv_libsdp_sys="yes", ac_cv_libsdp_sys="no"))
56 AM_CONDITIONAL(WANT_LIBSDP_SYS, test "$ac_cv_libsdp_sys" = "yes")
58 AC_CONFIG_FILES([Makefile src/Makefile libsdp.spec])