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
|
## -*- autoconf -*-
dnl This file is part of the hk_classes libraries/packages
dnl Copyright (C) 2001-2003 Horst Knorr (hk_classes@knoda.org)
dnl This file is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Library General Public
dnl License as published by the Free Software Foundation;
dnl version 2 of the License.
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl Library General Public License for more details.
dnl You should have received a copy of the GNU Library General Public License
dnl along with this library; see the file COPYING.LIB. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl Usage
dnl =====
dnl Just add HK_CLASSESTEST to your configure.in file
dnl If you want to develop under KDE add HK_CLASSESTEST and HK_KDECLASSESTEST at the very end of your
dnl configure.in, just before the AC_OUTPUT entry.
dnl It is very important to that HK_KDECLASSESTEST stands after HK_CLASSESTEST
dnl and all KDE specific entries.
AC_DEFUN(HK_CLASSESTEST,
[
hkversion=0.7.3
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_LIB(dl,dlopen)
AC_MSG_CHECKING([whether hk_classes >=$hkversion is available])
ac_save_LIBS="$LIBS"
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_CXXLIBS="$CXXLIBS"
if test "$with_hk_classes_dir" = ""; then
HK_CLASSESDIR=/usr/lib/hk_classes
HK_CLASSESINCDIR=/usr/include/hk_classes
else
HK_CLASSESDIR=$with_hk_classes_dir
HK_CLASSESINCDIR=$HK_CLASSESDIR/include
fi
if test "$with_hk_classes_incdir" != ""; then
HK_CLASSESINCDIR=$with_hk_classes_incdir
fi
CXXLIBS=" -L${HK_CLASSESDIR} -lhk_classes"
LIBS="$ac_save_LIBS -L${HK_CLASSESDIR} -lhk_classes "
CPPFLAGS="-I$HK_CLASSESINCDIR $ac_save_CPPFLAGS "
AC_TRY_LINK([#include <hk_visible.h>],[ hk_visible* v;v->action_on_key();
;
],[hk_lib=yes],[hk_lib=no])
AC_MSG_RESULT($hk_lib)
if test $hk_lib = no ; then
AC_MSG_ERROR(
hk_classes >=version $hkversion is NOT available !!
============================================================================
If you have installed the library in another directory than
/usr/lib/hk_classes
and the header files in : /usr/include/hk_classes
use the configure paramaters:
--with-hk_classes-dir=PATH Path to the hk_classes directory
--with-hk_classes-incdir=PATH Path to the hk_classes header files
You can get a copy at http://hk-classes.sourceforge.net
============================================================================
)
fi
AC_SSTREAM_EXISTS
AC_IOSTREAM_EXISTS
AC_SUBST(HK_CLASSESDIR)
AC_SUBST(HK_CLASSESINCDIR)
AC_LANG_RESTORE
])
AC_DEFUN(HK_KDECLASSESTEST,
[
AC_REQUIRE([HK_CLASSESTEST])
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
dnl AC_PREFIX_DEFAULT(${HK_CLASSESDIR:-/usr/local/hk_classes})
AC_CHECK_LIB(dl,dlopen)
AC_MSG_CHECKING([whether hk_kdeclasses is available])
ac_save_LIBS="$LIBS"
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_CXXLIBS="$CXXLIBS"
HK_CLASSESDIR=${HK_CLASSESDIR:-/usr/local/hk_classes}
HK_CLASSESINCDIR=$HK_CLASSESDIR/include
CXXLIBS="$ac_save_CXXLIBS -L${HK_CLASSESDIR} -L${KDEDIR}/lib -L${QTDIR}/lib -lhk_classes -lhk_kdeclasses -lqt -lkdecore -lkdeui"
LIBS="$ac_save_LIBS -L${HK_CLASSESDIR} -L${KDEDIR}/lib -L${QTDIR}/lib -lhk_classes -lqt -lhk_kdeclasses -lkdecore -lkdeui"
CPPFLAGS="$ac_save_CPPFLAGS -I$HK_CLASSESINCDIR -I$QTDIR/include -I$KDEDIR/include"
AC_TRY_LINK([
#include <hk_classes.h>
#include <hk_kdelineedit.h>
],[ hk_drivermanager p_class;hk_kdelineedit* l=new hk_kdelineedit(NULL);],[hk_lib=yes],[hk_lib=no])
AC_MSG_RESULT($hk_lib)
if test $hk_lib = no ; then
AC_MSG_ERROR(
Sorry
============================================================================
hk_kdeclasses are NOT available !!
You can get a copy at http://www.knoda.org
============================================================================
)
fi
AC_LANG_RESTORE
])
AC_DEFUN(AC_SSTREAM_EXISTS,
[
AC_REQUIRE([AC_LANG_CPLUSPLUS])
AC_REQUIRE([AC_PROG_CXX])
AC_MSG_CHECKING([whether <sstream> exists])
AC_TRY_LINK([#include <sstream>],[;],[sstream_exists=yes],[sstream_exists=no])
AC_MSG_RESULT($sstream_exists)
if test $sstream_exists = yes ; then
AC_DEFINE(HAVE_SSTREAM,1,Defines if stdc++ library contains a sstream implementation)
fi
])
AC_DEFUN(AC_IOSTREAM_EXISTS,
[
AC_MSG_CHECKING([whether <iostream> exists])
AC_TRY_LINK([#include <iostream>],[;],[iostream_exists=yes],[iostream_exists=no])
AC_MSG_RESULT($iostream_exists)
if test $iostream_exists = yes ; then
AC_DEFINE(HAVE_IOSTREAM,1,Defines if stdc++ library contains a iostream implementation)
fi
])
|