3
dnl This file is part of the KDE libraries/packages
4
dnl Copyright (C) 1997 Janos Farkas (chexum@shadow.banki.hu)
5
dnl (C) 1997,98,99 Stephan Kulow (coolo@kde.org)
7
dnl This file is free software; you can redistribute it and/or
8
dnl modify it under the terms of the GNU Library General Public
9
dnl License as published by the Free Software Foundation; either
10
dnl version 2 of the License, or (at your option) any later version.
12
dnl This library is distributed in the hope that it will be useful,
13
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
dnl Library General Public License for more details.
17
dnl You should have received a copy of the GNU Library General Public License
18
dnl along with this library; see the file COPYING.LIB. If not, write to
19
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
dnl Boston, MA 02111-1307, USA.
22
AC_DEFUN([KDE_CHECK_MICO],
24
AC_REQUIRE([KDE_CHECK_LIBDL])
25
AC_REQUIRE([KDE_MISC_TESTS])
26
AC_MSG_CHECKING(for MICO)
28
if test -z "$MICODIR"; then
29
kde_micodir=/usr/local
31
kde_micodir="$MICODIR"
35
[ --with-micodir=micodir where mico is installed ],
37
kde_micodir=$kde_micodir
40
AC_CACHE_VAL(kde_cv_mico_incdir,
42
mico_incdirs="$kde_micodir/include /usr/include /usr/local/include /usr/local/include /opt/local/include $kde_extra_includes"
43
AC_FIND_FILE(CORBA.h, $mico_incdirs, kde_cv_mico_incdir)
46
kde_micodir=`echo $kde_cv_mico_incdir | sed -e 's#/include##'`
48
if test ! -r $kde_micodir/include/CORBA.h; then
49
AC_MSG_ERROR([No CORBA.h found, specify another micodir])
52
AC_MSG_RESULT($kde_micodir)
54
MICO_INCLUDES=-I$kde_micodir/include
55
AC_SUBST(MICO_INCLUDES)
56
MICO_LDFLAGS=-L$kde_micodir/lib
57
AC_SUBST(MICO_LDFLAGS)
61
AC_MSG_CHECKING([for MICO version])
62
AC_CACHE_VAL(kde_cv_mico_version,
65
cat >conftest.$ac_ext <<EOF
67
#include <mico/version.h>
70
printf("MICO_VERSION=%s\n",MICO_VERSION);
74
ac_compile='${CC-gcc} $CFLAGS $MICO_INCLUDES conftest.$ac_ext -o conftest'
75
if AC_TRY_EVAL(ac_compile); then
76
if eval `./conftest 2>&5`; then
77
kde_cv_mico_version=$MICO_VERSION
79
AC_MSG_ERROR([your system is not able to execute a small application to
80
find MICO version! Check $kde_micodir/include/mico/version.h])
83
AC_MSG_ERROR([your system is not able to compile a small application to
84
find MICO version! Check $kde_micodir/include/mico/version.h])
88
dnl installed MICO version
89
mico_v_maj=`echo $kde_cv_mico_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
90
mico_v_mid=`echo $kde_cv_mico_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
91
mico_v_min=`echo $kde_cv_mico_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
93
if test "x$1" = "x"; then
99
dnl required MICO version
100
req_v_maj=`echo $req_version | sed -e 's/^\(.*\)\..*\..*$/\1/'`
101
req_v_mid=`echo $req_version | sed -e 's/^.*\.\(.*\)\..*$/\1/'`
102
req_v_min=`echo $req_version | sed -e 's/^.*\..*\.\(.*\)$/\1/'`
104
if test "$mico_v_maj" -lt "$req_v_maj" || \
105
( test "$mico_v_maj" -eq "$req_v_maj" && \
106
test "$mico_v_mid" -lt "$req_v_mid" ) || \
107
( test "$mico_v_mid" -eq "$req_v_mid" && \
108
test "$mico_v_min" -lt "$req_v_min" )
111
AC_MSG_ERROR([found MICO version $kde_cv_mico_version but version $req_version \
112
at least is required. You should upgrade MICO.])
114
AC_MSG_RESULT([$kde_cv_mico_version (minimum version $req_version, ok)])
117
LIBMICO="-lmico$kde_cv_mico_version $LIBCRYPT $LIBSOCKET $LIBDL"
119
if test -z "$IDL"; then
120
IDL='$(kde_bindir)/cuteidl'
123
IDL_DEPENDENCIES='$(kde_includes)/CUTE.h'
124
AC_SUBST(IDL_DEPENDENCIES)
126
idldir="\$(includedir)/idl"
131
AC_DEFUN([KDE_CHECK_MINI_STL],
133
AC_REQUIRE([KDE_CHECK_MICO])
135
AC_MSG_CHECKING(if we use mico's mini-STL)
136
AC_CACHE_VAL(kde_cv_have_mini_stl,
140
kde_save_cxxflags="$CXXFLAGS"
141
CXXFLAGS="$CXXFLAGS $MICO_INCLUDES"
144
#include <mico/config.h>
151
kde_cv_have_mini_stl=no,
152
kde_cv_have_mini_stl=yes)
153
CXXFLAGS="$kde_save_cxxflags"
157
if test "x$kde_cv_have_mini_stl" = "xyes"; then
168
AC_DEFUN([KDE_CHECK_ANSI],
172
AC_DEFUN([KDE_CHECK_INSURE],
174
AC_ARG_ENABLE(insure, [ --enable-insure use insure++ for debugging [default=no]],
176
if test $enableval = "no"; dnl
177
then ac_use_insure="no"
178
else ac_use_insure="yes"
180
], [ac_use_insure="no"])
182
AC_MSG_CHECKING(if we will use Insure++ to debug)
183
AC_MSG_RESULT($ac_use_insure)
184
if test "$ac_use_insure" = "yes"; dnl
185
then CC="insure"; CXX="insure"; dnl CFLAGS="$CLAGS -fno-rtti -fno-exceptions "????
189
AC_DEFUN([KDE_CHECK_NEWLIBS],