summaryrefslogtreecommitdiffstats
path: root/configure.in.in
blob: 1a5cd4a78e93dadb4afd25689d94b3b537074593 (plain)
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
#MIN_CONFIG(3.2.0)

AM_INIT_AUTOMAKE(autostart, 0.1)
AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN

# These numbers should be tweaked on every release. Read carefully:
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
# http://sourceware.org/autobook/autobook/autobook_91.html
lt_current="1"
lt_revision="0"
lt_age="0"
AC_SUBST(lt_current)
AC_SUBST(lt_revision)
AC_SUBST(lt_age)

PKG_CHECK_MODULES(KRB5, krb5, have_krb5=yes, have_krb5=no)
if test "x$have_krb5" = "xno"; then
  # Try to find krb5 without pkg-config file (required for older distros)
  AC_MSG_CHECKING(krb5)
  AC_FIND_FILE(krb5.h, [\
    /usr/local/include/heimdal /usr/local/include \
    /usr/include/heimdal /usr/include \
    ], krb5_includes)
  if test "x$krb5_includes" != "xNO"; then
    krb5_multiarch="`gcc -print-multiarch 2>/dev/null`"
    AC_FIND_FILE(libkrb5.so, [\
        /usr/local/lib/$krb5_multiarch/heimdal /usr/local/lib64/heimdal /usr/local/lib/heimdal \
        /usr/local/lib/$krb5_multiarch /usr/local/lib64 /usr/local/lib \
        /usr/lib/$krb5_multiarch/heimdal /usr/lib64/heimdal /usr/lib/heimdal \
        /usr/lib/$krb5_multiarch /usr/lib64 /usr/lib \
        ], krb5_libs)
    if test "x$krb5_libs" != "xNO"; then
      AC_MSG_RESULT([libraries $krb5_libs, headers $krb5_includes])
      CPPFLAGS="$CPPFLAGS -I$krb5_includes"
      CFLAGS="$CFLAGS -I$krb5_includes"
      LDFLAGS="$LDFLAGS -L$krb5_libs"
      AC_CHECK_HEADER(krb5.h, have_krb5=yes)
    fi
  fi
  if test "x$have_krb5" != "xno"; then
    KRB5_CFLAGS="-I$krb5_includes"
    KRB5_LIBS="-L$krb5_libs -lkrb5"
    AC_SUBST(KRB5_CFLAGS)
    AC_SUBST(KRB5_LIBS)
  else
    AC_MSG_RESULT(no)
  fi
fi
if test "x$have_krb5" = "xno"; then
  AC_MSG_ERROR([krb5 library is needed but not found on our system])
fi