File: configure.in

package info (click to toggle)
dapl 2.0.19-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 4,220 kB
  • ctags: 4,033
  • sloc: ansic: 39,217; sh: 9,657; makefile: 528
file content (101 lines) | stat: -rw-r--r-- 3,044 bytes parent folder | download | duplicates (2)
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
dnl Process this file with autoconf to produce a configure script.

AC_PREREQ(2.57)
AC_INIT(dapl, 2.0.19, general@lists.openfabrics.org)
AC_CONFIG_SRCDIR([dat/udat/udat.c])
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(dapl, 2.0.19)

AM_PROG_LIBTOOL

AC_ARG_ENABLE(libcheck, [  --disable-libcheck      do not test for presence of ib libraries],
[       if test x$enableval = xno ; then
                disable_libcheck=yes
        fi
])

dnl Checks for programs
AC_PROG_CC

dnl Checks for libraries
if test "$disable_libcheck" != "yes"
then
AC_CHECK_LIB(ibverbs, ibv_get_device_list, [],
    AC_MSG_ERROR([ibv_get_device_list() not found.  libdapl requires libibverbs.]))
fi

dnl Checks for header files.
if test "$disable_libcheck" != "yes"
then
AC_CHECK_HEADER(infiniband/verbs.h, [],
    AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
fi

AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
    if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
        ac_cv_version_script=yes
    else
        ac_cv_version_script=no
    fi)
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")

dnl Support debug mode build - if enable-debug provided the DEBUG variable is set 
AC_ARG_ENABLE(debug,
[  --enable-debug Turn on debug mode, default=off],
[case "${enableval}" in
  yes) debug=true ;;
  no)  debug=false ;;
  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
esac],[debug=false])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)

dnl Support ib_extension build - if enable-ext-type == ib 
AC_ARG_ENABLE(ext-type,
[  --enable-ext-type Enable extensions support for library: ib, none, default=ib],
 [ if   test "x$enableval" = "xib" ; then
      ext_type=ib
   elif test "x$enableval" = "xnone" ; then
      ext_type=none
   else
      echo
      echo "Error!"
      echo "Unknown extension type' type"
      exit -1
   fi
 ],[ext_type=ib])
AM_CONDITIONAL(EXT_TYPE_IB, test "$ext_type" = "ib")

dnl Check for Redhat EL release 4
AC_CACHE_CHECK(Check for RHEL4 system, ac_cv_rhel4,
    if test -f /etc/redhat-release &&
       test -n "`grep -e "release 4" /etc/redhat-release`"; then
        ac_cv_rhel4=yes
    else
        ac_cv_rhel4=no
    fi)
AM_CONDITIONAL(OS_RHEL4, test "$ac_cv_rhel4" = "yes")

dnl Check for Redhat EL release 5
AC_CACHE_CHECK(Check for RHEL5 system, ac_cv_rhel5,
    if test -f /etc/redhat-release &&
       test -n "`grep -e "release 5" /etc/redhat-release`"; then
        ac_cv_rhel5=yes
    else
        ac_cv_rhel5=no
    fi)
AM_CONDITIONAL(OS_RHEL5, test "$ac_cv_rhel5" = "yes")

dnl Check for SuSE release 11
AC_CACHE_CHECK(Check for SUSE_11 system, ac_cv_suse11,
    if test -f /etc/SuSE-release &&
       test -n "`grep -e "VERSION = 11" /etc/SuSE-release`"; then
        ac_cv_suse11=yes
    else
        ac_cv_suse11=no
    fi)
AM_CONDITIONAL(OS_SUSE11, test "$ac_cv_suse11" = "yes")

AC_CONFIG_FILES([Makefile test/dtest/Makefile test/dapltest/Makefile dapl.spec])

AC_OUTPUT