File: configure.in

package info (click to toggle)
gbuffy 0.1-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 380 kB
  • ctags: 379
  • sloc: ansic: 4,329; sh: 175; makefile: 146; perl: 44; awk: 2
file content (95 lines) | stat: -rw-r--r-- 2,568 bytes parent folder | download
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(gbuffy.h)
AC_CONFIG_HEADER(config.h)
VERSION=0
SUBVERSION=.1

AC_MSG_CHECKING(for prefix)
if test x$prefix = xNONE; then
  gbuffy_cv_prefix=$ac_default_prefix
else
  gbuffy_cv_prefix=$prefix
fi
AC_MSG_RESULT($gbuffy_cv_prefix)

AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL

AC_DEFINE_UNQUOTED(VERSION, "$VERSION$SUBVERSION")
AC_SUBST(VERSION)

AC_PATH_XTRA

gbuffy_led=no
AC_ARG_ENABLE(led, [  --enable-led            Enable LINUX specific LED support],
  [if test $enableval = yes; then
     gbuffy_led=yes
   fi
   ])

if test $gbuffy_led = yes; then
  AC_DEFINE(USE_LED)
  LED=led
  AC_SUBST(LED)
  AC_MSG_RESULT(Enabling LINUX keyboard LED blinking support)
else
  AC_MSG_RESULT(Disabling keyboard LED blinking support)
fi
   
dnl gbuffy_nntp_server=no
dnl AC_ARG_ENABLE(nntp, [  --enable-nntp[=server]  Enable NNTP 'Mailbox' support],
dnl   [if test x$enableval != xyes; then
dnl      gbuffy_nntp_server=$enableval
dnl    fi
dnl    AC_DEFINE(USE_NNTP)
dnl    LIBOBJS="$LIBOBJS nntp.o"
dnl    AC_CHECK_LIB(socket, socket)
dnl    AC_CHECK_LIB(nsl, gethostbyname)
dnl    if test x$gbuffy_nntp_server != xno; then
dnl      AC_DEFINE_UNQUOTED(NNTP_SERVER, "$gbuffy_nntp_server")
dnl      AC_SUBST(NNTP_SERVER)
dnl      AC_MSG_RESULT(Using NNTP Server $gbuffy_nntp_server)
dnl    fi])

gbuffy_cv_length=yes
AC_ARG_ENABLE(length, [  --disable-length        Do NOT use Content-Length: header],
  [if test $enableval = no; then 
    gbuffy_cv_length=no;
    AC_MSG_RESULT(Disabling Content-Length: Header)
   fi])

if test $gbuffy_cv_length = yes; then
  AC_DEFINE(USE_CONTENT_LENGTH)
fi

gbuffy_cv_compface=yes
AC_CHECK_LIB(compface, uncompface)
AC_CHECK_FUNC(uncompface, gbuffy_cv_compface=no)
if test $gbuffy_cv_compface = yes; then
  LIBOBJS="$LIBOBJS compface/libcompface.a"
  CPPFLAGS="-I\$(srcdir)/compface $CPPFLAGS"
 else
  LIBS="$LIBS -lcompface"
fi

AC_HEADER_STDC

AC_CHECK_FUNCS(setpriority)
AC_REPLACE_FUNCS(utimes strdup bcopy)

gbuffy_cv_snprintf=no
SNPRINTFOBJS=""
AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF)], [gbuffy_cv_snprintf=yes])
AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF)], [gbuffy_cv_snprintf=yes])
if test $gbuffy_cv_snprintf = yes; then
  LIBOBJS="$LIBOBJS snprintf.o"
  SNPRINTFOBJS="snprintf.o"
fi

AC_ARG_WITH(exec-shell, [  --with-exec-shell=SHELL Specify alternate shell (ONLY if /bin/sh is broken)],
        [if test $withval != yes; then
                AC_DEFINE_UNQUOTED(EXECSHELL, "$withval")
        fi])

AC_OUTPUT(Makefile compface/Makefile)