fookb: Add version 3.1 to repository.
[dockapps.git] / fookb / configure.in
blobf41d1ae8497e740a03153c9cf24ee7863fee0035
1 dnl Process this file with autoconf to produce a configure script.
2 dnl
3 dnl (c) 1998-2004 Alexey Vyskubov <alexey@mawhrin.net>
4 dnl
5 dnl vim:ts=8:sts=2:shiftwidth=2:expandtab:foldmethod=marker
7 dnl {{{1
8 AC_INIT(fookb.c)
10 dnl Checks for programs.
11 AC_PROG_CC
13 WUTIL_LIB="-lWUtil"
14 AC_SUBST(WUTIL_LIB)
15 dnl }}}1
17 dnl Checks for libraries. {{{1
19 dnl Basic checks: X compilation settings and essential libraries {{{2
21 AC_PATH_XTRA
22 dnl Adds C compiler flags to X_CFLAGS and X linker flags to X_CFLAGS
23 dnl Extra libraries will be in X_EXTRA_LIBS
24 dnl Libraries wich should be linked before -lX11 will be in X_PRE_LIBS
25 dnl We do not check X_DISPLAY_MISSING because we need to check for
26 dnl XkbOpenDisplay in libX11 anyway.
28 AC_CHECK_LIB(
29   [X11],
30   [XkbOpenDisplay],
31   ,
32   [AC_MSG_ERROR([[Fatal: no libX11 or no XkbOpenDisplay() in libX11]])],
33   $X_LIBS
36 AC_CHECK_LIB(
37   [Xpm],
38   [XpmReadFileToImage],
39   ,
40   [AC_MSG_ERROR([[Fatal: no libXpm found!]])],
41   $X_LIBS
44 dnl }}}2
46 dnl --enable/disable libWUtil (property lists handling) {{{2
48 AC_ARG_ENABLE(
49   [libWUtil],
50   [  --enable-libWUtil       try to use property lists handling in libWUtil],
51   [
52     if test $enable_libWUtil = yes ; then
54 dnl   enabled: libWUtil and WINGs/WUtil.h check {{{3    
55       AC_CHECK_LIB(
56         [WUtil],
57         [WMReadPropListFromFile],
58         [
59           dnl library is found; let's check header file {{{4
60           AC_CHECK_HEADERS(
61             [WINGs/WUtil.h],
62             ,
63             [
64               AC_MSG_WARN([[No WINGs/WUtil.h found -- cannot compile version with property lists support. You should use X resources for customizing fookb; or, if you have libproplist, use older version of fookb]])
65               WUTIL_LIB=""
66             ]
67           )
68           dnl }}}4
69         ],
70         [
71           AC_MSG_WARN([[No libWUtil found or old libWUtil version. You should use X resources for setting up fookb. If you have libproplist, use older version of fookb]])
72           WUTIL_LIB=""
73         ]
74         ,
75         $X_LIBS
76       )
77       dnl That's EVEN BETTER than LISP!!!
78 dnl }}}3
79     else
80 dnl if --disable-libWUtil is given we just do almost nothing
81       UTIL_LIB=""
82     fi
83   ],
84   [
85 dnl neither --enable nor --disable-libWUtil is not given.
86 dnl By default we will try to search for libWUtil {{{3
87     AC_CHECK_LIB(
88       [WUtil],
89       [WMReadPropListFromFile],
90       [
91         dnl library is found; let's check header file {{{4
92         AC_CHECK_HEADERS(
93           [WINGs/WUtil.h],
94           ,
95           [
96             AC_MSG_WARN([[No WINGs/WUtil.h found -- cannot compile version with property lists support. You should use X resources for customizing fookb; or, if you have libproplist, use older version of fookb]])
97             WUTIL_LIB=""
98           ]
99         )
100         dnl }}}4
101       ],
102       [
103         AC_MSG_WARN([[No libWUtil found or old libWUtil version. You should use X resources for setting up fookb. If you have libproplist, use older version of fookb]])
104         WUTIL_LIB=""
105       ]
106       ,
107       $X_LIBS
108     )
109 dnl }}}3
110   ]
113 dnl }}}2
115 dnl }}}1
117 AC_ARG_ENABLE(
118   [wmaker],
119   [  --enable-wmaker         create windowmaker dockable application],
120   [ 
121     if test $enable_wmaker = yes ; then
122       AC_DEFINE(WMAKER)
123     fi
124   ],
125   [
126     AC_CHECK_PROG(HAVE_WMAKER, wmaker, yes, no)
127   
128     if test $HAVE_WMAKER = yes ; then
129       AC_DEFINE(WMAKER)
130     fi
131   ]
134 AC_OUTPUT(Makefile)