File: configure.in

package info (click to toggle)
bbsload 0.2.5-5
  • links: PTS
  • area: main
  • in suites: woody
  • size: 484 kB
  • ctags: 740
  • sloc: cpp: 5,111; sh: 327; makefile: 81
file content (111 lines) | stat: -rw-r--r-- 2,636 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
dnl Process this file with autoconf to produce a configure script.
AC_INIT(bbsload.cc)

AM_INIT_AUTOMAKE(bbsload, 0.2.5)

AC_PREFIX_DEFAULT(/usr/local)



AC_CHECK_PROGS(regex_cmd, sed)
if test x$regex_cmd = "x"; then
 AC_MSG_ERROR([error. sed is required to build the default bbtoolsrc file.])
fi


dnl get the debug values right
AC_DEFUN(AC_SET_DEBUG,
[
 test "$CFLAGS" = "" && CFLAGS="-g -Wall -DDEBUG"
 test "$CXXFLAGS" = "" && CXXFLAGS="-g -Wall -DDEBUG"
 test "$LDFLAGS" = "" && LDFLAGS=""
])

AC_DEFUN(AC_SET_NODEBUG,
[
 test "$CFLAGS" = "" && CFLAGS="-O2 -Wall"
 test "$CXXFLAGS" = "" && CXXFLAGS="-O2 -Wall"
 test "$LDFLAGS" = "" && LDFLAGS="-s"
])
      

AC_ARG_ENABLE(debug,[  --enable-debug	create debugging code [default=no]],
[
if test $enableval = "no";
 then AC_SET_NODEBUG
 else AC_SET_DEBUG
fi
],
AC_SET_NODEBUG)

dnl Check for Interlacing
INTERLACE=""
AC_MSG_CHECKING([whether to include interlacing image code])
AC_ARG_ENABLE(
  interlace, [  --enable-interlace      include code for image interlacing[default=yes]],
  if test x$enableval = "xyes"; then
    AC_MSG_RESULT([yes])
    INTERLACE="-DINTERLACE"
  else
    AC_MSG_RESULT([no])
  fi,
  AC_MSG_RESULT([yes])
  INTERLACE="-DINTERLACE"
)
AC_SUBST(INTERLACE)


dnl Check for new button style 
NEWBUTTONSTYLE=""
AC_MSG_CHECKING([whether to use new mouse button style])
AC_ARG_ENABLE(
  newbutton, [  --enable-newbutton      use new mouse button style [defaul=no] 
                          left change desktop, middle move window],
  if test x$enableval = "xyes"; then
    AC_MSG_RESULT([yes])
    NEWBUTTONSTYLE="-DNEW_BUTTON_STYLE"
  else
    AC_MSG_RESULT([no])
  fi,
  AC_MSG_RESULT([yes])
  NEWBUTTONSTYLE="-DNEW_BUTTON_STYLE"

)
AC_SUBST(NEWBUTTONSTYLE)

dnl Checks for programs.
dnl needed by configure itsself
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL

AC_HEADER_STDC
AC_CHECK_HEADERS(ctype.h fcntl.h libgen.h locale.h process.h signal.h stdio.h time.h unistd.h sys/param.h sys/select.h sys/stat.h sys/time.h sys/types.h sys/wait.h)
AC_HEADER_TIME


AC_PATH_X
AC_PATH_XTRA

CFLAGS="$CFLAGS $X_CFLAGS"
CXXFLAGS="$CXXFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS $X_PRE_LIBS"
dnl Checks for X libraries.
AC_CHECK_LIB(X11, XOpenDisplay, LDFLAGS="$LDFLAGS -lX11",
             AC_MSG_ERROR(XOpenDisplay not found in -lX11))

LDFLAGS="$LDFLAGS $X_EXTRA_LIBS"

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h)

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

dnl Checks for library functions.
AC_CHECK_FUNCS(setlocale sigaction strftime)

AC_OUTPUT(version.h Makefile data/Makefile)