configure.ac 2.96 KB
Newer Older
1
AC_INIT(radsecproxy, 1.6-rc0, radsecproxy@uninett.no)
2
AC_CANONICAL_TARGET
venaas's avatar
venaas committed
3
4
AM_INIT_AUTOMAKE
AC_PROG_CC
Linus Nordberg's avatar
Linus Nordberg committed
5
AC_PROG_RANLIB
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
udp=yes
AC_ARG_ENABLE(udp,
  [  --enable-udp whether to enable UDP transport: yes/no; default yes ],
  [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
      udp=$enableval
    else
      echo "--enable-udp argument must be yes or no"
      exit -1
    fi
  ])
 
tcp=yes
AC_ARG_ENABLE(tcp,
  [  --enable-tcp whether to enable TCP transport: yes/no; default yes ],
  [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
      tcp=$enableval
    else
      echo "--enable-tcp argument must be yes or no"
      exit -1
    fi
  ])
 
tls=yes
AC_ARG_ENABLE(tls,
  [  --enable-tls whether to enable TLS (RadSec) transport: yes/no; default yes ],
  [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
      tls=$enableval
    else
      echo "--enable-tls argument must be yes or no"
      exit -1
    fi
  ])
 
dtls=yes
AC_ARG_ENABLE(dtls,
  [  --enable-dtls whether to enable DTLS transport: yes/no; default yes ],
  [ if test "x$enableval" = "xyes" -o "x$enableval" = "xno" ; then
      dtls=$enableval
    else
      echo "--enable-dtls argument must be yes or no"
      exit -1
    fi
  ])
49

50
51
52
53
54
55
56
57
58
AC_ARG_ENABLE(fticks,
AC_HELP_STRING([--enable-fticks],[build with F-Ticks support [default=no]]),
[case $enableval in
yes|no) ;;
*) AC_MSG_ERROR([bad value $enableval for --enable-fticks, need yes or no]) ;;
esac],
[enable_fticks=no])

if test "$enable_fticks" = "yes"; then
59
AC_CHECK_LIB([nettle], [nettle_sha256_init],,
60
61
62
63
64
65
66
67
68
    [AC_MSG_WARN([required library nettle not found, fticks support disabled])
     enable_fticks=no])
fi

if test "$enable_fticks" = "yes"; then
AC_DEFINE([WANT_FTICKS], [1])
fi
AM_CONDITIONAL(WANT_FTICKS, test "$enable_fticks" = "yes")

venaas's avatar
venaas committed
69
70
71
72
dnl Check if we're on Solaris and set CFLAGS accordingly
AC_CANONICAL_SYSTEM
case "${target_os}" in
  solaris*)
linus's avatar
linus committed
73
74
75
    TARGET_CFLAGS="-DSYS_SOLARIS9 -D_POSIX_PTHREAD_SEMANTICS"
    if test "$GCC" != yes ; then
      TARGET_CFLAGS="$TARGET_CFLAGS -mt"
linus's avatar
linus committed
76
    else
77
      TARGET_CFLAGS="$TARGET_CFLAGS -pthreads"
linus's avatar
linus committed
78
    fi
79
    TARGET_LDFLAGS="-lpthread -lsocket -lnsl"
venaas's avatar
venaas committed
80
81
    ;;
  *)
82
    TARGET_CFLAGS="-Wall -pedantic -Wno-long-long -pthread"
venaas's avatar
venaas committed
83
84
    TARGET_LDFLAGS=""
  esac
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
dnl Adding enabled options
if test "x$udp" = "xyes" ; then
  echo "UDP transport enabled"
  TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_UDP"
fi
if test "x$tcp" = "xyes" ; then
  echo "TCP transport enabled"
  TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_TCP"
fi
if test "x$tls" = "xyes" ; then
  echo "TLS (RadSec) transport enabled"
  TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_TLS"
fi
if test "x$dtls" = "xyes" ; then
  echo "DTLS transport enabled"
  TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_DTLS"
fi
 
103
104
105
106
AC_ARG_VAR([DOCBOOK2X_MAN], [docbook2x-man])
AC_CHECK_PROG([DOCBOOK2X_MAN], [docbook2x-man], [yes])
AM_CONDITIONAL(HAVE_DOCBOOK2X_MAN, test "$DOCBOOK2X_MAN" = "yes")

venaas's avatar
venaas committed
107
108
AC_SUBST(TARGET_CFLAGS)
AC_SUBST(TARGET_LDFLAGS)
venaas's avatar
venaas committed
109
AX_CHECK_SSL
110
111
112
113
AC_OUTPUT([
	Makefile
	tests/Makefile
])