wmgtemp: Use 'char' instead of 'unsigned char' for bit mask.
[dockapps.git] / wmlongrun / configure.ac
blob311be1d1610ce26b751cc805d0bbcf79505b13d0
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT([wmlongrun], [0.3.1], [wmaker-dev@lists.windowmaker.org])
3 AC_CONFIG_SRCDIR([src/main.c])
4 AM_INIT_AUTOMAKE
5 AM_CONFIG_HEADER(config.h)
7 dnl Checks for programs.
8 AC_PROG_CC
9 AC_PROG_INSTALL
11 dnl Checks for header files.
12 AC_HEADER_STDC
14 dnl
15 dnl Specify paths to look for libraries and headers
16 dnl ===============================================
17 AC_ARG_WITH(libs-from,
18                 [  --with-libs-from        pass compiler flags to look for libraries],
19                         [lib_search_path="$withval $lib_search_path"])
21 AC_ARG_WITH(incs-from,
22                 [  --with-incs-from        pass compiler flags to look for header files],
23                         [inc_search_path="$withval $inc_search_path"])
26 dnl ===========================================
27 dnl             Stuff that uses X
28 dnl ===========================================
30 AC_PATH_XTRA
32 X_LIBRARY_PATH=$x_libraries
34 XCFLAGS="$X_CFLAGS"
36 XLFLAGS="$X_LIBS"
38 XLIBS="-lX11 $X_EXTRA_LIBS"
41 lib_search_path="$lib_search_path $XLFLAGS -L/usr/local/lib"
42 inc_search_path="$inc_search_path $XCFLAGS -I/usr/local/include"
44 AC_SUBST(X_LIBRARY_PATH)
46 AC_CHECK_LIB(Xext, XShapeCombineMask,,
47     [echo "The shape extension stuff could not be found in the X client
48     libraries"
49     exit 1],
50     $X_LIBS $X_EXTRA_LIBS -lX11)
52 AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,,
53     [echo "The libXpm library was not found, but is necessary to build this
54     library"
55     exit 1],
56     $X_LIBS $X_EXTRA_LIBS -lX11)
58 AC_SUBST(XCFLAGS)
59 AC_SUBST(XLFLAGS)
60 AC_SUBST(XLIBS)
62 AC_SUBST(X_EXTRA_LIBS)
64 dnl ===============================================
65 dnl             End of stuff that uses X
66 dnl ===============================================
68 dnl =========
69 dnl Debugging
70 dnl =========
71 AC_ARG_ENABLE(debug,
72              [  --enable-debug          enable debugging ],,enable_debug=no)
73 if test "$enable_debug" = yes; then
74   DFLAGS="-Wall -g -ansi -pedantic"
76 AC_SUBST(DFLAGS)
78 dnl ============
79 dnl Check for OS
80 dnl ============
82 AC_CANONICAL_HOST
84 arch=""
85 case ${host_os} in
86 linux* | *-gnu | gnu*)
87   SETUID_FLAGS="-m 4755 -o root -g root"
88   OS=linux
89   AC_DEFINE([LINUX], [1], [use Linux specific code])
90   ;;
91 freebsd*)
92   OS=freebsd
93 dnl  AC_DEFINE(FREEBSD)
94   ;;
96   echo ""
97   echo "${host_os} is NOT supported"
98   echo ""
99   exit 1
100   ;;
101 esac
103 AC_SUBST(OS)
104 AC_SUBST(SETUID_FLAGS)
105 AC_SUBST(LIBS)
108 dnl =============================
109 dnl Checks for library functions.
110 dnl =============================
112 LIBRARY_SEARCH_PATH="$lib_search_path"
113 HEADER_SEARCH_PATH="$inc_search_path"
115 AC_SUBST(LIBRARY_SEARCH_PATH)
116 AC_SUBST(HEADER_SEARCH_PATH)
119 dnl Checks for header files.
120 AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h)
121 AC_CHECK_HEADERS(string.h,, [
122 AC_CHECK_HEADERS(strings.h,,)])
124 dnl Checks for typedefs, structures, and compiler characteristics.
125 AC_CHECK_FUNCS(select)
127 dnl Checks for library functions.
129 AC_OUTPUT(Makefile src/Makefile doc/Makefile)