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