6
AC_REQUIRE([KDE_CHECK_EXTRA_LIBS])
7
AC_MSG_CHECKING([for libz])
8
AC_CACHE_VAL(ac_cv_lib_z,
12
LIBS="$all_libraries $USER_LDFLAGS -lz $LIBSOCKET"
13
kde_save_CFLAGS="$CFLAGS"
14
CFLAGS="$CFLAGS $all_includes $USER_INCLUDES"
19
[return (zlibVersion() == ZLIB_VERSION); ],
20
eval "ac_cv_lib_z='-lz'",
21
eval "ac_cv_lib_z=no")
23
CFLAGS="$kde_save_CFLAGS"
25
if test ! "$ac_cv_lib_z" = no; then
26
AC_DEFINE_UNQUOTED(HAVE_LIBZ, 1, [Define if you have libz])
29
AC_MSG_RESULT($ac_cv_lib_z)
31
AC_MSG_ERROR(not found. Check your installation and look into config.log)
37
AC_DEFUN(KDE_CHECK_EXTRA_LIBS,
39
AC_MSG_CHECKING(for extra includes)
40
AC_ARG_WITH(extra-includes, [ --with-extra-includes=DIR
41
adds non standard include paths],
42
kde_use_extra_includes="$withval",
43
kde_use_extra_includes=NONE
46
if test -n "$kde_use_extra_includes" && \
47
test "$kde_use_extra_includes" != "NONE"; then
51
for dir in $kde_use_extra_includes; do
52
kde_extra_includes="$kde_extra_includes $dir"
53
USER_INCLUDES="$USER_INCLUDES -I$dir"
56
kde_use_extra_includes="added"
58
kde_use_extra_includes="no"
60
AC_SUBST(USER_INCLUDES)
62
AC_MSG_RESULT($kde_use_extra_includes)
65
AC_MSG_CHECKING(for extra libs)
66
AC_ARG_WITH(extra-libs, [ --with-extra-libs=DIR adds non standard library paths],
67
kde_use_extra_libs=$withval,
68
kde_use_extra_libs=NONE
70
if test -n "$kde_use_extra_libs" && \
71
test "$kde_use_extra_libs" != "NONE"; then
75
for dir in $kde_use_extra_libs; do
76
kde_extra_libs="$kde_extra_libs $dir"
77
KDE_EXTRA_RPATH="$KDE_EXTRA_RPATH -R $dir"
78
USER_LDFLAGS="$USER_LDFLAGS -L$dir"
81
kde_use_extra_libs="added"
83
kde_use_extra_libs="no"
86
AC_SUBST(USER_LDFLAGS)
88
AC_MSG_RESULT($kde_use_extra_libs)
92
dnl ------------------------------------------------------------------------
93
dnl Find a file (or one of more files in a list of dirs)
94
dnl ------------------------------------------------------------------------
96
AC_DEFUN(AC_FIND_FILE,
103
echo "configure: __oline__: $i/$j" >&AC_FD_CC
104
if test -r "$i/$j"; then
105
echo "taking that" >&AC_FD_CC