4 dnl WM_CHECK_LIB
(NAME
, FUNCTION
, EXTRALIBS
)
9 LDFLAGS
="$LDFLAGS $lib_search_path"
10 AC_CHECK_LIB
([$1],[$2],yes=yes,no
=no
,[$3])
11 LDFLAGS
="$LDFLAGS_old"
16 dnl WM_CHECK_HEADER
(NAME
)
18 AC_DEFUN
(WM_CHECK_HEADER
,
20 CPPFLAGS_old
="$CPPFLAGS"
21 CPPFLAGS
="$CPPFLAGS $inc_search_path"
23 CPPFLAGS
="$CPPFLAGS_old"
28 dnl WM_CHECK_XFT_VERSION
(MIN_VERSION
, [ACTION-IF-FOUND
[,ACTION-IF-NOT-FOUND
]])
30 dnl
# $XFTFLAGS should be defined before calling this macro,
31 dnl
# else it will not be able to find Xft.h
33 AC_DEFUN
(WM_CHECK_XFT_VERSION
,
35 CPPFLAGS_old
="$CPPFLAGS"
36 CPPFLAGS
="$CPPFLAGS $XFTFLAGS $inc_search_path"
37 xft_major_version
=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
38 xft_minor_version
=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
39 xft_micro_version
=`echo $1 | sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
40 AC_MSG_CHECKING
([whether libXft is
at least version
$1])
41 AC_CACHE_VAL
(ac_cv_lib_xft_version_ok
,
43 [/* Test version of libXft we have
*/
45 #include <X11/Xft/Xft.h>
47 #if !defined(XFT_VERSION) || XFT_VERSION < $xft_major_version*10000 + $xft_minor_version*100 + $xft_micro_version
48 #error libXft on this system is too old. Consider upgrading to at least $1
51 eval "ac_cv_lib_xft_version_ok=yes",
52 eval "ac_cv_lib_xft_version_ok=no")])
53 if eval "test \"`echo '$ac_cv_lib_xft_version_ok'`\" = yes"; then
55 ifelse
([$2], , :, [$2])
58 ifelse
([$3], , , [$3])
60 CPPFLAGS
="$CPPFLAGS_old"
65 dnl WM_CHECK_REDCRAP_BUGS
(prefix
,bindir
,libdir
)
67 AC_DEFUN
(WM_CHECK_REDCRAP_BUGS
,
69 AC_MSG_CHECKING
(for RedHat system
)
72 if test -f /etc
/redhat-release
; then
76 AC_MSG_RESULT
($wm_check_flag)
80 if test "$wm_check_flag" = yes; then
82 AC_MSG_WARN
([Red Hat system
; checking
for Red-Hat-specific bugs.
])
85 # Check old wmaker from RedHat
87 if test "[$1]" != "/usr/X11R6" -a "$prefix" != "/usr/X11"; then
88 AC_MSG_CHECKING
(for multiple installed wmaker versions
)
89 if test -f /usr
/X11R
6/bin
/wmaker
; then
95 AC_MSG_RESULT
(no apparent problems
)
99 # Check for infamous en_RN bug
100 # Wont work because autoconf will change LANG in the beginning of the
104 #AC_MSG_CHECKING(for silly en_RN joke that only causes headaches)
106 #if test "x$LANG" = xen_RN; then
107 #AC_MSG_RESULT(uh oh)
108 #AC_MSG_WARN([the LANG environment variable is set to the en_RN
109 #locale. Please unset it or you will have mysterious problems when
110 #using various software packages.])
113 #AC_MSG_RESULT(no problem)
116 # If binary installation path is /usr/local/bin, check if it's in PATH
118 if test "[$2]" = "/usr/local/bin"; then
119 AC_MSG_CHECKING
(if /usr
/local
/bin is
in the search PATH
)
121 rh_missing_usr_local_bin
=yes
125 if test "x$i" = "x/usr/local/bin"; then
127 rh_missing_usr_local_bin
=no
132 if test "$wm_check_flag" = no
; then
136 AC_MSG_RESULT
(no problem
)
140 # If library installation path is /usr/local/lib,
141 # check if it's in /etc/ld.so.conf
143 if test "[$3]" = "/usr/local/lib"; then
145 rh_missing_usr_local_lib
=no
146 AC_MSG_CHECKING
(if /usr
/local
/lib is
in /etc
/ld.so.conf
)
147 test -z "`grep /usr/local/lib /etc/ld.so.conf`"
148 test "$?" -eq 0 && wm_check_flag
=no
149 if test "$wm_check_flag" = no
; then
151 rh_missing_usr_local_lib
=yes
154 AC_MSG_RESULT
(no problem
)
158 # Check for symbolic links
160 AC_MSG_CHECKING
(for /usr
/include
/X11 symbolic link
)
161 rh_missing_usr_include_x11
=no
162 if test -d "/usr/include/X11"; then
166 rh_missing_usr_include_x11
=yes
173 AC_MSG_CHECKING
(for /lib
/cpp
)
174 rh_missing_lib_cpp
=no
175 if test -f "/lib/cpp"; then
179 rh_missing_lib_cpp
=yes
189 dnl WM_PRINT_REDCRAP_BUG_STATUS
()
191 AC_DEFUN
(WM_PRINT_REDCRAP_BUG_STATUS
,
193 if test "$rh_is_redhat" = yes; then
194 if test "$mins_found" = yes -o "$bugs_found" = yes; then
196 AC_MSG_WARN
([It seems you are using a system packaged by Red Hat.
197 I have
done some checks
for Red-Hat-specific bugs
, and I found some
198 problems. Please
read the INSTALL
file regarding Red Hat
, resolve
199 the problems
, and try to run configure again.
201 Here are the problems I found
:
203 if test "x$rh_old_wmaker" = xyes
; then
204 echo "Problem: Old version of Window Maker in /usr/X11R6/bin."
205 echo "Description: You seem to have an old version of Window Maker"
206 echo " installed in /usr/X11R6/bin. It is recommended"
207 echo " that you uninstall any previously installed"
208 echo " packages of WindowMaker before installing a new one."
211 if test "x$rh_missing_usr_local_bin" = xyes
; then
212 echo "Problem: PATH is missing /usr/local/bin."
213 echo "Description: Your PATH environment variable does not appear to"
214 echo " contain the directory /usr/local/bin. Please add it."
217 if test "x$rh_missing_usr_local_lib" = xyes
; then
218 echo "Problem: /etc/ld.so.conf missing /usr/local/lib"
219 echo "Description: Your /etc/ld.so.conf file does not appear to contain"
220 echo " the directory /usr/local/lib. Please add it."
223 if test "x$rh_missing_usr_x11" = xyes
; then
224 echo "Problem: Missing /usr/X11 symbolic link."
225 echo "Description: Your system is missing a symbolic link from"
226 echo " /usr/X11R6 to /usr/X11. Please create one."
229 if test "x$rh_missing_usr_include_x11" = xyes
; then
230 echo "Problem: Missing /usr/include/X11 symbolic link."
231 echo "Description: Your system is missing a symbolic link from"
232 echo " /usr/X11R6/include/X11 to /usr/include/X11."
233 echo " Please create one."
236 if test "x$rh_missing_lib_cpp" = xyes
; then
237 echo "Problem: Missing /lib/cpp symbolic link."
238 echo "Description: Your system is missing a symbolic link from the"
239 echo " cpp (C preprocessor) program to /lib/cpp."
240 echo " Please create one."
243 if test "x$bugs_found" = xyes
; then
244 AC_MSG_ERROR
([One or
more of the problems above can potentially
245 cause Window Maker not to
install or run properly. Please resolve
246 the problems and try to run configure again.
])
248 elif test "x$mins_found" = xyes
; then
249 AC_MSG_WARN
([The problems above may or may not cause Window Maker
250 not to
install or run properly. If you have any problems during
251 installation or execution
, please resolve the problems and try to
252 install Window Maker again.
])
257 echo "You appear to have a system packaged by Red Hat, but I could"
258 echo "not find any Red-Hat-specific problems that I know about."