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"
29 dnl WM_CHECK_REDCRAP_BUGS
(prefix
,bindir
,libdir
)
31 AC_DEFUN
(WM_CHECK_REDCRAP_BUGS
,
33 AC_MSG_CHECKING
(for RedHat system
)
36 if test -f /etc
/redhat-release
; then
40 AC_MSG_RESULT
($wm_check_flag)
44 if test "$wm_check_flag" = yes; then
46 AC_MSG_WARN
([Red Hat system
; checking
for Red-Hat-specific bugs.
])
49 # Check old wmaker from RedHat
51 if test "[$1]" != "/usr/X11R6" -a "$prefix" != "/usr/X11"; then
52 AC_MSG_CHECKING
(for multiple installed wmaker versions
)
53 if test -f /usr
/X11R
6/bin
/wmaker
; then
59 AC_MSG_RESULT
(no apparent problems
)
63 # Check for infamous en_RN bug
64 # Wont work because autoconf will change LANG in the beginning of the
68 #AC_MSG_CHECKING(for silly en_RN joke that only causes headaches)
70 #if test "x$LANG" = xen_RN; then
72 #AC_MSG_WARN([the LANG environment variable is set to the en_RN
73 #locale. Please unset it or you will have mysterious problems when
74 #using various software packages.])
77 #AC_MSG_RESULT(no problem)
80 # If binary installation path is /usr/local/bin, check if it's in PATH
82 if test "[$2]" = "/usr/local/bin"; then
83 AC_MSG_CHECKING
(if /usr
/local
/bin is
in the search PATH
)
85 rh_missing_usr_local_bin
=yes
89 if test "x$i" = "x/usr/local/bin"; then
91 rh_missing_usr_local_bin
=no
96 if test "$wm_check_flag" = no
; then
100 AC_MSG_RESULT
(no problem
)
104 # If library installation path is /usr/local/lib,
105 # check if it's in /etc/ld.so.conf
107 if test "[$3]" = "/usr/local/lib"; then
109 rh_missing_usr_local_lib
=no
110 AC_MSG_CHECKING
(if /usr
/local
/lib is
in /etc
/ld.so.conf
)
111 test -z "`grep /usr/local/lib /etc/ld.so.conf`"
112 test "$?" -eq 0 && wm_check_flag
=no
113 if test "$wm_check_flag" = no
; then
115 rh_missing_usr_local_lib
=yes
118 AC_MSG_RESULT
(no problem
)
122 # Check for symbolic links
124 AC_MSG_CHECKING
(for /usr
/include
/X11 symbolic link
)
125 rh_missing_usr_include_x11
=no
126 if test -d "/usr/include/X11"; then
130 rh_missing_usr_include_x11
=yes
137 AC_MSG_CHECKING
(for /lib
/cpp
)
138 rh_missing_lib_cpp
=no
139 if test -f "/lib/cpp"; then
143 rh_missing_lib_cpp
=yes
153 dnl WM_PRINT_REDCRAP_BUG_STATUS
()
155 AC_DEFUN
(WM_PRINT_REDCRAP_BUG_STATUS
,
157 if test "$rh_is_redhat" = yes; then
158 if test "$mins_found" = yes -o "$bugs_found" = yes; then
160 AC_MSG_WARN
([It seems you are using a system packaged by Red Hat.
161 I have
done some checks
for Red-Hat-specific bugs
, and I found some
162 problems. Please
read the INSTALL
file regarding Red Hat
, resolve
163 the problems
, and try to run configure again.
165 Here are the problems I found
:
167 if test "x$rh_old_wmaker" = xyes
; then
168 echo "Problem: Old version of Window Maker in /usr/X11R6/bin."
169 echo "Description: You seem to have an old version of Window Maker"
170 echo " installed in /usr/X11R6/bin. It is recommended"
171 echo " that you uninstall any previously installed"
172 echo " packages of WindowMaker before installing a new one."
175 if test "x$rh_missing_usr_local_bin" = xyes
; then
176 echo "Problem: PATH is missing /usr/local/bin."
177 echo "Description: Your PATH environment variable does not appear to"
178 echo " contain the directory /usr/local/bin. Please add it."
181 if test "x$rh_missing_usr_local_lib" = xyes
; then
182 echo "Problem: /etc/ld.so.conf missing /usr/local/lib"
183 echo "Description: Your /etc/ld.so.conf file does not appear to contain"
184 echo " the directory /usr/local/lib. Please add it."
187 if test "x$rh_missing_usr_x11" = xyes
; then
188 echo "Problem: Missing /usr/X11 symbolic link."
189 echo "Description: Your system is missing a symbolic link from"
190 echo " /usr/X11R6 to /usr/X11. Please create one."
193 if test "x$rh_missing_usr_include_x11" = xyes
; then
194 echo "Problem: Missing /usr/include/X11 symbolic link."
195 echo "Description: Your system is missing a symbolic link from"
196 echo " /usr/X11R6/include/X11 to /usr/include/X11."
197 echo " Please create one."
200 if test "x$rh_missing_lib_cpp" = xyes
; then
201 echo "Problem: Missing /lib/cpp symbolic link."
202 echo "Description: Your system is missing a symbolic link from the"
203 echo " cpp (C preprocessor) program to /lib/cpp."
204 echo " Please create one."
207 if test "x$bugs_found" = xyes
; then
208 AC_MSG_ERROR
([One or
more of the problems above can potentially
209 cause Window Maker not to
install or run properly. Please resolve
210 the problems and try to run configure again.
])
212 elif test "x$mins_found" = xyes
; then
213 AC_MSG_WARN
([The problems above may or may not cause Window Maker
214 not to
install or run properly. If you have any problems during
215 installation or execution
, please resolve the problems and try to
216 install Window Maker again.
])
221 echo "You appear to have a system packaged by Red Hat, but I could"
222 echo "not find any Red-Hat-specific problems that I know about."