File: configure.in

package info (click to toggle)
bobot%2B%2B 1%3A1.97-10.3
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 744 kB
  • ctags: 874
  • sloc: cpp: 7,254; makefile: 146
file content (70 lines) | stat: -rw-r--r-- 1,664 bytes parent folder | download | duplicates (4)
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(source/Makefile.in)

dnl Options
AC_ARG_ENABLE(crypt,
[  --disable-crypt         Do not use the crypt function],
[
  if test $enableval = "no"; then
    DISABLE_CRYPT="-DNOCRYPT"
  fi
  AC_SUBST(DISABLE_CRYPT)
])

AC_ARG_ENABLE(script,
[  --enable-script         Use GUILE scripts],
[
  if test $enableval = "yes"; then
    GUILE_DEFINES="-DUSESCRIPTS -DMULTITHREAD"
    GUILE_LIBS="`guile-config link` -lpthread"
    GUILE_SOURCES="BotInterp.C Interp.C ScriptCommands.C"
    GUILE_INCLUDES="BotInterp.H Interp.H ScriptCommands.H"
  fi
  AC_SUBST(GUILE_DEFINES)
  AC_SUBST(GUILE_LIBS)
  AC_SUBST(GUILE_SOURCES)
  AC_SUBST(GUILE_INCLUDES)
])

AC_ARG_ENABLE(telnetserver,
[  --enable-telnetserver   Use the Telnet server],
[
  if test $enableval = "yes"; then
    TSERVER_DEFINES="-DTSERVER"
    TSERVER_SOURCES=""
    TSERVER_INCLUDES=""
  fi
  AC_SUBST(TSERVER_DEFINES)
  AC_SUBST(TSERVER_SOURCES)
  AC_SUBST(TSERVER_INCLUDES)
])


dnl Checks for programs.
AC_PROG_CXX

dnl Checks for STL compliance
AC_CPP_STL
AC_CPP_STL_CLEAR

dnl Checks for libraries.
AC_CHECK_LIB(crypt, crypt, [LDFLAGS="-lcrypt $LDFLAGS]")
AC_CHECK_LIB(socket, socket, [LDFLAGS="-lsocket $LDFLAGS]")
AC_CHECK_LIB(nsl, connect, [LDFLAGS="-lnsl $LDFLAGS]")

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_HEADER_TIME
AC_STRUCT_TM

dnl Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(select socket strtoul)

dnl Generates the makefiles
AC_OUTPUT(source/Makefile)
AC_OUTPUT(Makefile)