1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
|
dnl Copyright (c) 1998 N. D. Bellamy
AC_DEFUN(AC_PATH_QT_LIB,
[
AC_REQUIRE_CPP()
AC_REQUIRE([AC_PATH_X])
AC_MSG_CHECKING(for QT libraries)
ac_qt_libraries="no"
AC_ARG_WITH(qt-libraries,
[ --with-qt-libraries where the QT libraries are located. ],
[ ac_qt_libraries="$withval" ])
AC_CACHE_VAL(ac_cv_lib_qtlib, [
dnl Did the user give --with-qt-libraries?
if test "$ac_qt_libraries" = no; then
dnl No they didn't, so lets look for them...
dnl If you need to add extra directories to check, add them here.
qt_library_dirs="\
/usr/lib \
/usr/local/lib \
/usr/lib/qt \
/usr/lib/qt/lib \
/usr/local/lib/qt \
/usr/local/qt/lib \
/usr/X11/lib \
/usr/X11/lib/qt \
/usr/X11R6/lib \
/usr/X11R6/lib/qt"
if test "x$QTDIR" != x; then
qt_library_dirs="$qt_library_dirs $QTDIR/lib"
fi
if test "x$QTLIB" != x; then
qt_library_dirs="$qt_library_dirs $QTLIB"
fi
for qt_dir in $qt_library_dirs; do
for qt_check_lib in $qt_dir/libqt.so*; do
if test -r $qt_check_lib; then
ac_qt_libraries=$qt_dir
break 2
fi
done
done
fi
ac_cv_lib_qtlib=$ac_qt_libraries
])
dnl Define a shell variable for later checks
if test "$ac_cv_lib_qtlib" = no; then
have_qt_lib="no"
else
have_qt_lib="yes"
fi
AC_MSG_RESULT([$ac_cv_lib_qtlib])
QT_LDFLAGS="-L$ac_cv_lib_qtlib"
QT_LIBDIR="$ac_cv_lib_qtlib"
AC_SUBST(QT_LDFLAGS)
AC_SUBST(QT_LIBDIR)
])
AC_DEFUN(AC_PATH_QT_INC,
[
AC_REQUIRE_CPP()
AC_REQUIRE([AC_PATH_X])
AC_MSG_CHECKING(for QT includes)
ac_qt_includes="no"
AC_ARG_WITH(qt-includes,
[ --with-qt-includes where the QT headers are located. ],
[ ac_qt_includes="$withval" ])
AC_CACHE_VAL(ac_cv_header_qtlib, [
dnl Did the user give --with-qt-includes?
if test "$ac_qt_includes" = no; then
dnl No they didn't, so lets look for them...
dnl If you need to add extra directories to check, add them here.
qt_include_dirs="\
/usr/lib/qt/include \
/usr/include/qt \
/usr/local/qt/include \
/usr/local/include/qt \
/usr/X11/include/qt \
/usr/X11/include/X11/qt \
/usr/X11R6/include/qt \
/usr/X11R6/include/X11/qt"
if test "x$QTDIR" != x; then
qt_include_dirs="$qt_include_dirs $QTDIR/include"
fi
if test "x$QTINC" != x; then
qt_include_dirs="$qt_include_dirs $QTINC"
fi
for qt_dir in $qt_include_dirs; do
if test -r "$qt_dir/qlistbox.h"; then
ac_qt_includes=$qt_dir
break
fi
done
fi
ac_cv_header_qtlib=$ac_qt_includes
])
if test "$ac_cv_header_qtlib" = no; then
have_qt_inc="no"
else
have_qt_inc="yes"
fi
AC_MSG_RESULT([$ac_cv_header_qtlib])
QT_INCLUDES="-I$ac_cv_header_qtlib"
QT_INCDIR="$ac_cv_header_qtlib"
AC_SUBST(QT_INCLUDES)
AC_SUBST(QT_INCDIR)
])
AC_DEFUN(AC_PATH_QT_MOC,
[
AC_PATH_PROG(
QT_MOC,
moc,
/usr/bin/moc,
$PATH:/usr/bin:/usr/X11R6/bin:$QTDIR/bin:/usr/lib/qt/bin:/usr/local/qt/bin)
])
AC_DEFUN(AC_CHECK_SOCKS5,
[
AC_MSG_CHECKING(whether to enable SOCKS5 support)
WITH_SOCKS5="no"
SOCKS_LIBS=""
SOCKS_LIBDIR=""
SOCKS_INCDIR=""
AC_ARG_ENABLE(
socks5,
[ --enable-socks5 enable SOCKS5 firewall support],
WITH_SOCKS5=yes)
AC_ARG_WITH(
socks5-inc,
[ --with-socks5-inc=PATH include path for SOCKS5 headers],
socks_incdir="$withval", socks_incdir="no")
AC_ARG_WITH(
socks5-lib,
[ --with-socks5-lib=PATH library path for SOCKS5 libraries],
socks_libdir="$withval", socks_libdir="no")
if test "$WITH_SOCKS5" = "no"; then
AC_MSG_RESULT(no)
else
AC_MSG_RESULT(yes)
if test "$socks_libdir" = "no"; then
AC_CHECK_LIB(socks5, SOCKSconnect, SOCKS_LIBS="-lsocks5")
else
AC_MSG_CHECKING(where to look for the SOCKS5 library)
SOCKS_LIBS="-lsocks5"
SOCKS_LIBDIR="-L$socks_libdir"
AC_MSG_RESULT($socks_libdir)
fi
if test "$socks_incdir" = "no"; then
AC_CHECK_HEADER(socks.h)
else
AC_MSG_CHECKING(where to look for the SOCKS5 headers)
SOCKS_INCDIR="-I$socks_incdir"
AC_MSG_RESULT($socks_incdir)
fi
AC_DEFINE(USE_SOCKS5)
fi
dnl Substitute these even if they're null, so as not to mess up makefiles
AC_SUBST(SOCKS_LIBS)
AC_SUBST(SOCKS_LIBDIR)
AC_SUBST(SOCKS_INCDIR)
])
|