TDE base libraries and programs
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

279 lines
8.4KB

  1. #MIN_CONFIG
  2. KDE_ENABLE_HIDDEN_VISIBILITY
  3. dnl PAM, shadow passwords, libcrypt
  4. KDE_PASSWDLIBS
  5. DEF_PAM_SERVICE(tdm, tdm, TDM)
  6. DEF_PAM_SERVICE(kcp, kcheckpass, KCHECKPASS)
  7. DEF_PAM_SERVICE(kss, tdescreensaver, TDESCREENSAVER)
  8. dnl Checks for header files.
  9. AC_HEADER_DIRENT
  10. AC_HEADER_STDC
  11. AC_CHECK_HEADERS(sys/time.h crypt.h \
  12. sys/select.h sys/ioctl.h sys/stropts.h stropts.h termio.h termios.h sys/termios.h \
  13. lastlog.h sys/socket.h sys/sockio.h \
  14. sys/m_wait.h ncurses.h paths.h login_cap.h syslog.h \
  15. sys/wait.h sys/ucred.h sys/mount.h floatingpoint.h fstab.h mntent.h \
  16. Alib.h libutil.h util.h time.h limits.h vfork.h string.h float.h \
  17. math.h nan.h ieeefp.h
  18. )
  19. AC_CHECK_HEADER(pty.h)
  20. AC_CHECK_FUNC(ptsname,,)
  21. dnl Checks for Alib on HP-UX (added by deller, Apr 29 1999)
  22. AC_CHECK_LIB(Alib, main, [LIBALIB="-lAlib"]) dnl HP-UX network audio server
  23. AC_SUBST(LIBALIB)
  24. dnl Checks for RPC functions
  25. AC_CHECK_FUNC(clnttcp_create, , [
  26. AC_CHECK_LIB(nsl, clnttcp_create, [LIBRPC="-lnsl"])])
  27. AC_SUBST(LIBRPC)
  28. dnl Check for ossaudio on NetBSD
  29. AC_CHECK_LIB(ossaudio, main, [LIBOSSAUDIO="-lossaudio"])
  30. AC_SUBST(LIBOSSAUDIO)
  31. dnl Check for AIX stuff
  32. AC_CHECK_LIB(cfg, main, [LIBCFG="-lcfg"]) dnl for AIX
  33. AC_SUBST(LIBCFG)
  34. AC_CHECK_LIB(odm, main, [LIBODM="-lodm"]) dnl for AIX
  35. AC_SUBST(LIBODM)
  36. dnl SMB checks moved to their own configure.in.in
  37. kde_have_setupterm=yes
  38. AC_CHECK_LIB(curses, setupterm, [LIBCURSES=-lcurses],
  39. AC_CHECK_LIB(ncurses, setupterm, [LIBCURSES=-lncurses],
  40. AC_CHECK_LIB(mytinfo, setupterm, [LIBCURSES=-lmytinfo],
  41. kde_have_setupterm=no)))
  42. AC_SUBST(LIBCURSES)
  43. if test "$kde_have_setupterm" = "yes"; then
  44. AC_DEFINE_UNQUOTED(HAVE_SETUPTERM, 1, [Define if you have setupterm in -l(n)curses])
  45. fi
  46. AC_CHECK_FUNC(res_init, ,
  47. AC_CHECK_LIB(resolv, res_init, [LIBRESOLV="-lresolv"], , $LIBSOCKET)) dnl for Sun
  48. AC_SUBST(LIBRESOLV)
  49. dnl Checks for typedefs, structures, and compiler characteristics.
  50. AC_LANG_CPLUSPLUS
  51. AC_HEADER_TIME
  52. dnl check if the compiler has bool
  53. AC_CHECK_BOOL
  54. AC_LANG_C
  55. AC_C_LONG_DOUBLE
  56. AC_TYPE_GETGROUPS
  57. dnl for libsmb
  58. AC_CHECK_SIZEOF(char,1)
  59. AC_CHECK_SIZEOF(short,2)
  60. AC_CHECK_SIZEOF(int,4)
  61. AC_CHECK_SIZEOF(long,4)
  62. AC_C_BIGENDIAN
  63. AC_CHECK_FUNCS(socket powl sqrtl strdup getdtablesize setpgid nice seteuid vsyslog initgroups setgroups getgroups grantpt pw_encrypt setpriority getpt unlockpt ptsname waitpid getpassphrase)
  64. AC_CHECK_MKSTEMPS
  65. AC_CHECK_SETENV
  66. AC_CHECK_UNSETENV
  67. AC_CHECK_GETDOMAINNAME
  68. AC_CHECK_GETHOSTNAME
  69. AC_CHECK_USLEEP
  70. AC_CHECK_RANDOM
  71. AC_CHECK_S_ISSOCK
  72. AC_CHECK_KDEMAXPATHLEN
  73. AC_MSG_CHECKING([if it's safe to enable UTMP])
  74. case "$host_os" in
  75. linux*) utmp_support=yes;
  76. ;;
  77. freebsd*) utmp_support=yes;
  78. ;;
  79. kfreebsd*-gnu) utmp_support=yes;
  80. ;;
  81. *) utmp_support=no;
  82. esac
  83. AC_MSG_RESULT($utmp_support)
  84. if test "$utmp_support" = yes; then
  85. AC_DEFINE_UNQUOTED(UTMP_SUPPORT, 1, [Define if you want to use utmp entries])
  86. fi
  87. AC_CHECK_UTMP_FILE
  88. dnl Checks for Solaris' libkstat
  89. kde_have_kstat=yes
  90. AC_CHECK_LIB(kstat, kstat_open, [LIBKSTAT=-lkstat], kde_have_kstat=no)
  91. AC_SUBST(LIBKSTAT)
  92. if test "$kde_have_kstat" = "yes"; then
  93. AC_DEFINE(HAVE_KSTAT, 1, [Defines if you have Solaris' libkstat])
  94. fi
  95. dnl Checks for libdevinfo (Solaris 7 and later)
  96. dnl since the library is available on earlier Solaris releases (but
  97. dnl with a completely different and undocumented interface),
  98. dnl we have to verfy that the required header is present as well
  99. AC_CHECK_HEADER(libdevinfo.h,
  100. kde_have_libdevinfo_h=yes,
  101. kde_have_libdevinfo_h=no)
  102. if test "$kde_have_libdevinfo_h" = "yes"; then
  103. kde_have_libdevinfo_lib=yes
  104. AC_CHECK_LIB(devinfo, di_init, [LIBDEVINFO=-ldevinfo], kde_have_libdevinfo_lib=no)
  105. if test "$kde_have_libdevinfo_lib" = "yes"; then
  106. AC_DEFINE(HAVE_LIBDEVINFO_H, 1, [Defines if you have libdevinfo of Solaris 7 or later])
  107. AC_SUBST(LIBDEVINFO)
  108. fi
  109. fi
  110. dnl check for java
  111. KDE_CHECK_JAVA_DIR
  112. dnl check for an md5sum implementation. the GNU versions
  113. dnl produce different output from the FreeBSD / Solaris
  114. dnl versions, so MD5SUM_CUT shows how to retrieve the
  115. dnl checksum from the output.
  116. MD5SUM_CUT="-f 1"
  117. AC_PATH_PROGS(MD5SUM, [md5sum gmd5sum], [])
  118. if test -z "$MD5SUM" ; then
  119. AC_PATH_PROG(MD5SUM, [md5], [])
  120. if test -z "$MD5SUM" ; then
  121. AC_PATH_PROG(MD5SUM, [md5], [], [/sbin])
  122. fi
  123. if test -z "$MD5SUM" ; then
  124. AC_MSG_WARN([No md5sum, gmd5sum, or md5 was found. The fish IOSlave cannot be compiled.])
  125. # Will fail anyway, but in a better way than a blank command.
  126. MD5SUM="md5sum"
  127. MD5SUM_CUT="-f 1"
  128. else
  129. MD5SUM_CUT="-f 4"
  130. fi
  131. fi
  132. AC_SUBST(MD5SUM_CUT)
  133. dnl ----- Checks for X11 extensions -----
  134. ac_save_ldflags="$LDFLAGS"
  135. LDFLAGS="$X_LDFLAGS"
  136. dnl --- XTEST check
  137. XTESTLIB=
  138. KDE_CHECK_HEADER(X11/extensions/XTest.h,
  139. [AC_CHECK_LIB( Xtst, XTestFakeKeyEvent,
  140. [AC_DEFINE(HAVE_XTEST, 1, [Define if you have the XTest extension])
  141. XTESTLIB=-lXtst],
  142. , [ $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS ])
  143. ])
  144. AC_SUBST(XTESTLIB)
  145. dnl --- XKB check
  146. KDE_CHECK_HEADER(X11/XKBlib.h,
  147. [AC_CHECK_LIB( X11, XkbLockModifiers,
  148. [AC_DEFINE(HAVE_XKB, 1, [Define if you have the XKB extension])],
  149. , [ $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS ])
  150. AC_CHECK_LIB( X11, XkbSetPerClientControls,
  151. [AC_DEFINE(HAVE_XKBSETPERCLIENTCONTROLS, 1, [Define if you have XkbSetPerClientControls])],
  152. , [ $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS ])
  153. ], [], [#include <X11/Xlib.h>])
  154. dnl --- Xcursor check (not technically an extension)
  155. KDE_CHECK_HEADERS(X11/Xcursor/Xcursor.h,
  156. [KDE_CHECK_LIB(Xcursor, XcursorSupportsARGB, [
  157. LIB_XCURSOR=-lXcursor
  158. AC_DEFINE_UNQUOTED(HAVE_XCURSOR, 1, [Define to 1 if you have Xcursor])
  159. ], [ LIB_XCURSOR= ], [ $X_PRE_LIBS -lX11 $X_EXTRA_LIBS ])],
  160. [ LIB_XCURSOR= ], [#include <X11/Xlib.h>])
  161. AC_SUBST(LIB_XCURSOR)
  162. AM_CONDITIONAL(have_xcursor, test "$LIB_XCURSOR" = -lXcursor)
  163. dnl XRender check
  164. KDE_CHECK_HEADER(X11/extensions/Xrender.h, [xrender_h=yes], [xrender_h=no])
  165. if test "$xrender_h" = yes; then
  166. KDE_CHECK_LIB(Xrender, XRenderComposite, [
  167. LIB_XRENDER=-lXrender
  168. AC_DEFINE_UNQUOTED(HAVE_XRENDER, 1, [Defined if your system has XRender support])
  169. ], [], -lXext -lX11 $X_EXTRA_LIBS)
  170. else
  171. LIB_XRENDER=
  172. fi
  173. AC_SUBST(LIB_XRENDER)
  174. LDFLAGS="$ac_save_ldflags"
  175. dnl ----- end of X11 extension checks -----
  176. CXXFLAGS="$CXXFLAGS $KDE_DEFAULT_CXXFLAGS"
  177. KDE_INIT_DOXYGEN([KDE base API Reference], [Version $VERSION])
  178. dnl Ok, tdebase has _sooo_ many Makefiles, that the check for uniqueness
  179. dnl of those filenames in the list of the files (done by autoconf macros
  180. dnl itself) is taking more that nine minutes (!). For tdebase only we take
  181. dnl out that test. (matz@kde.org)
  182. m4_define([_AC_CONFIG_UNIQUE], [])dnl
  183. AH_VERBATIM(_osf_stuff, [
  184. #if !defined(HAVE_SETEUID)
  185. #define seteuid(_eu) setresuid(-1, _eu, -1)
  186. #endif
  187. ])
  188. AH_VERBATIM(_broken_xkb, [
  189. #if defined(__osf__) || defined(__APPLE__)
  190. #define AVOID_XKB /* for konsole to avoid XKB and XTEST */
  191. #endif
  192. ])
  193. dnl this is for tdm and kcontrol
  194. KDE_EXPAND_MAKEVAR(KDE_CONFDIR, kde_confdir)
  195. AC_DEFINE_UNQUOTED(KDE_CONFDIR, "$KDE_CONFDIR", [KDE's configuration directory])
  196. KDE_EXPAND_MAKEVAR(KDE_DATADIR, kde_datadir)
  197. AC_DEFINE_UNQUOTED(KDE_DATADIR, "$KDE_DATADIR", [KDE's static data directory])
  198. KDE_EXPAND_MAKEVAR(KDE_BINDIR, kde_bindir)
  199. AC_DEFINE_UNQUOTED(KDE_BINDIR, "$KDE_BINDIR", [KDE's binaries directory])
  200. AC_SUBST(KDE_BINDIR)
  201. dnl libart is used by tdm, kcontrol and thumbnails code in tdeioslaves
  202. KDE_FIND_PATH(libart2-config, LIBART_CONFIG, [${prefix}/bin ${exec_prefix}/bin /usr/local/bin /opt/local/bin], [
  203. AC_MSG_WARN([Could not find libart anywhere, check http://www.levien.com/libart/])
  204. ])
  205. if test -n "$LIBART_CONFIG"; then
  206. vers=`$LIBART_CONFIG --version 2>/dev/null | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'`
  207. if test -n "$vers" && test "$vers" -ge 2003008
  208. then
  209. LIBART_LIBS="`$LIBART_CONFIG --libs`"
  210. LIBART_RPATH=
  211. for args in $LIBART_LIBS; do
  212. case $args in
  213. -L*)
  214. LIBART_RPATH="$LIBART_RPATH $args"
  215. ;;
  216. esac
  217. done
  218. LIBART_RPATH=`echo $LIBART_RPATH | sed -e "s/-L/-R/g"`
  219. LIBART_CFLAGS="`$LIBART_CONFIG --cflags`"
  220. AC_DEFINE_UNQUOTED(HAVE_LIBART, 1, [Defines if your system has the libart library])
  221. else
  222. AC_MSG_WARN([You need at least libart 2.3.8])
  223. fi
  224. fi
  225. dnl See if the underlying system honors socket permissions for system security purposes
  226. KDE_CHECK_HONORS_SOCKET_PERMS
  227. AC_SUBST(LIBART_LIBS)
  228. AC_SUBST(LIBART_CFLAGS)
  229. AC_SUBST(LIBART_RPATH)
  230. AC_ARG_WITH([composite],
  231. AC_HELP_STRING([--without-composite], [Disable Xcomposite support (default: check)]) )