File: configure.in

package info (click to toggle)
fbpager 0.1.5~git20090221.1.8e0927e6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 1,796 kB
  • ctags: 698
  • sloc: sh: 11,428; cpp: 3,821; makefile: 87
file content (108 lines) | stat: -rw-r--r-- 2,635 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
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
AC_INIT(src/main.cc)
AC_PREREQ(2.52)
AM_INIT_AUTOMAKE(fbpager,0.1.5,no-define)


AC_LANG_CPLUSPLUS
 
dnl Locate required external software
AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AM_PROG_LIBTOOL


dnl Check for system header files
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h signal.h sys/select.h sys/signal.h sys/stat.h sys/time.h sys/types.h sys/wait.h)

AC_CHECK_HEADERS(sstream, ,
        [ AC_CHECK_HEADERS(strstream,,
            [AC_MSG_ERROR([Your libstdc++ doesn't have the sstream or strstream classes])]
        )]
)

AC_HEADER_TIME
dnl Determine the return type of signal handlers
AC_TYPE_SIGNAL

AC_CHECK_FUNCS(sigaction strcasestr)

dnl Check for X headers and libraries
AC_PATH_X
AC_PATH_XTRA

test x$no_x = "xyes" && AC_MSG_ERROR([fbpager requires the X Window System libraries and headers.])

test x$x_includes = "x" && x_includes="/usr/include"
test x$x_libraries = "x" && x_libraries="/usr/lib"

CFLAGS="$CFLAGS $X_CFLAGS"
CXXFLAGS="$CXXFLAGS $X_CFLAGS"
LIBS="$LIBS $X_LIBS"
LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"

dnl Check for required functions in -lX11
AC_CHECK_LIB(X11, XOpenDisplay,
  LIBS="$LIBS -lX11",
  AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.])
)

LIBS="$LIBS $X_EXTRA_LIBS"

Xext_lib=""


dnl Check whether to include debugging code
DEBUG=""
AC_MSG_CHECKING([whether to include verbose debugging code])
AC_ARG_ENABLE(debug,
  [  --enable-debug          include verbose debugging code [default=no]],
  if test x$enableval = "xyes"; then
    AC_MSG_RESULT([yes])
    DEBUG="-DDEBUG -fno-inline"
  else
    AC_MSG_RESULT([no])
  fi,
  AC_MSG_RESULT([no])
)
AC_SUBST(DEBUG)
CXXFLAGS="$CXXFLAGS $DEBUG"

AC_MSG_CHECKING([whether to have Xrender (transparent) support])
AC_ARG_ENABLE(
  xrender,
[  --enable-xrender        Xrender (transparent) support [default=yes]],
  if test x$enableval = "xyes"; then
	AC_MSG_RESULT([yes])
	AC_CHECK_LIB(Xrender, XRenderCreatePicture, 
		AC_DEFINE(HAVE_XRENDER, 1, "Xrender support")
		LIBS="$LIBS -lXrender")
  else
    AC_MSG_RESULT([no])	
  fi,  
  AC_MSG_RESULT([yes])
  AC_CHECK_LIB(Xrender, XRenderCreatePicture, 
	AC_DEFINE(HAVE_XRENDER, 1, "Xrender support")
	LIBS="$LIBS -lXrender")
)

dnl Print results
AC_MSG_RESULT([])
AC_MSG_RESULT([	$PACKAGE version $VERSION configured successfully.])
AC_MSG_RESULT([])
AC_MSG_RESULT([Using '$prefix' for installation.])
AC_MSG_RESULT([Using '$CXX' for C++ compiler.])
AC_MSG_RESULT([Building with '$CXXFLAGS' for C++ compiler flags.])
AC_MSG_RESULT([Building with '$LIBS' for linker flags.])
AC_MSG_RESULT([])

dnl Output files
AM_CONFIG_HEADER(config.h)

AC_OUTPUT(
Makefile
version.h
src/Makefile
src/FbTk/Makefile
)