Shared admin folder
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

oldinclude.m4.in 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. ### -*- autoconf -*-
  2. dnl This file is part of the KDE libraries/packages
  3. dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
  4. dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
  5. dnl This file is free software; you can redistribute it and/or
  6. dnl modify it under the terms of the GNU Library General Public
  7. dnl License as published by the Free Software Foundation; either
  8. dnl version 2 of the License, or (at your option) any later version.
  9. dnl This library is distributed in the hope that it will be useful,
  10. dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. dnl Library General Public License for more details.
  13. dnl You should have received a copy of the GNU Library General Public License
  14. dnl along with this library; see the file COPYING.LIB. If not, write to
  15. dnl the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16. dnl Boston, MA 02110-1301, USA.
  17. AC_DEFUN([KDE_CHECK_MICO],
  18. [
  19. AC_REQUIRE([KDE_CHECK_LIBDL])
  20. AC_REQUIRE([KDE_MISC_TESTS])
  21. AC_MSG_CHECKING(for MICO)
  22. if test -z "$MICODIR"; then
  23. kde_micodir=/usr/local
  24. else
  25. kde_micodir="$MICODIR"
  26. fi
  27. AC_ARG_WITH(micodir,
  28. [ --with-micodir=micodir where mico is installed ],
  29. kde_micodir=$withval,
  30. kde_micodir=$kde_micodir
  31. )
  32. AC_CACHE_VAL(kde_cv_mico_incdir,
  33. [
  34. mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
  35. AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
  36. ])
  37. kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
  38. if test ! -r $kde_micodir/include/CORBA.h; then
  39. AC_MSG_ERROR([No CORBA.h found, specify another micodir])
  40. fi
  41. AC_MSG_RESULT($kde_micodir)
  42. MICO_INCLUDES=-I$kde_micodir/include
  43. AC_SUBST(MICO_INCLUDES)
  44. MICO_LDFLAGS=-L$kde_micodir/lib
  45. AC_SUBST(MICO_LDFLAGS)
  46. micodir=$kde_micodir
  47. AC_SUBST(micodir)
  48. AC_MSG_CHECKING([for MICO version])
  49. AC_CACHE_VAL(kde_cv_mico_version,
  50. [
  51. AC_LANG_C
  52. cat >conftest.$ac_ext <<EOF
  53. #include <stdio.h>
  54. #include <mico/version.h>
  55. int main() {
  56. printf("MICO_VERSION=%s\n",MICO_VERSION);
  57. return (0);
  58. }
  59. EOF
  60. ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
  61. if AC_TRY_EVAL(ac_compile); then
  62. if eval `./conftest 2>&5`; then
  63. kde_cv_mico_version=$MICO_VERSION
  64. else
  65. AC_MSG_ERROR([your system is not able to execute a small application to
  66. find MICO version! Check $kde_micodir/include/mico/version.h])
  67. fi
  68. else
  69. AC_MSG_ERROR([your system is not able to compile a small application to
  70. find MICO version! Check $kde_micodir/include/mico/version.h])
  71. fi
  72. ])
  73. dnl installed MICO version
  74. mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
  75. mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
  76. mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
  77. if test "x$1" = "x"; then
  78. req_version="2.3.0"
  79. else
  80. req_version=$1
  81. fi
  82. dnl required MICO version
  83. req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
  84. req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
  85. req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
  86. if test "$mico_v_maj" -lt "$req_v_maj" || \
  87. ( test "$mico_v_maj" -eq "$req_v_maj" && \
  88. test "$mico_v_mid" -lt "$req_v_mid" ) || \
  89. ( test "$mico_v_mid" -eq "$req_v_mid" && \
  90. test "$mico_v_min" -lt "$req_v_min" )
  91. then
  92. AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
  93. at least is required. You should upgrade MICO.])
  94. else
  95. AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
  96. fi
  97. LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
  98. AC_SUBST(LIBMICO)
  99. if test -z "$IDL"; then
  100. IDL='$(kde_bindir)/cuteidl'
  101. fi
  102. AC_SUBST(IDL)
  103. IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
  104. AC_SUBST(IDL_DEPENDENCIES)
  105. idldir="\$(includedir)/idl"
  106. AC_SUBST(idldir)
  107. ])
  108. AC_DEFUN([KDE_CHECK_MINI_STL],
  109. [
  110. AC_REQUIRE([KDE_CHECK_MICO])
  111. AC_MSG_CHECKING(if we use mico's mini-STL)
  112. AC_CACHE_VAL(kde_cv_have_mini_stl,
  113. [
  114. AC_LANG_SAVE
  115. AC_LANG_CPLUSPLUS
  116. kde_save_cxxflags="$CXXFLAGS"
  117. CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
  118. AC_TRY_COMPILE(
  119. [
  120. #include <mico/config.h>
  121. ],
  122. [
  123. #ifdef HAVE_MINI_STL
  124. #error "nothing"
  125. #endif
  126. ],
  127. kde_cv_have_mini_stl=no,
  128. kde_cv_have_mini_stl=yes)
  129. CXXFLAGS="$kde_save_cxxflags"
  130. AC_LANG_RESTORE
  131. ])
  132. if test "x$kde_cv_have_mini_stl" = "xyes"; then
  133. AC_MSG_RESULT(yes)
  134. $1
  135. else
  136. AC_MSG_RESULT(no)
  137. $2
  138. fi
  139. ])
  140. ])
  141. AC_DEFUN([KDE_CHECK_ANSI],
  142. [
  143. ])
  144. AC_DEFUN([KDE_CHECK_INSURE],
  145. [
  146. AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
  147. [
  148. if test $enableval = "no"; dnl
  149. then ac_use_insure="no"
  150. else ac_use_insure="yes"
  151. fi
  152. ], [ac_use_insure="no"])
  153. AC_MSG_CHECKING(if we will use Insure++ to debug)
  154. AC_MSG_RESULT($ac_use_insure)
  155. if test "$ac_use_insure" = "yes"; dnl
  156. then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
  157. fi
  158. ])
  159. AC_DEFUN([KDE_CHECK_NEWLIBS],
  160. [
  161. ])