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.
145 lines
3.2 KiB
145 lines
3.2 KiB
#MIN_CONFIG(3.2.0)
|
|
|
|
KDE_ENABLE_HIDDEN_VISIBILITY
|
|
|
|
AM_INIT_AUTOMAKE(ktechlab, 0.3)
|
|
AC_C_BIGENDIAN
|
|
AC_CHECK_KDEMAXPATHLEN
|
|
|
|
|
|
################################
|
|
## BEGIN Check for gpsim 0.21 ##
|
|
################################
|
|
|
|
AC_LANG_SAVE
|
|
AC_LANG_CPLUSPLUS
|
|
ktechlab_save_CXXFLAGS="$CXXFLAGS"
|
|
|
|
AC_ARG_WITH(glib12, [ --with-glib12 force using glib 1.2.x [default=no]])
|
|
if test "x$with_glib12" != "xyes" ; then
|
|
glib_cflags=`pkg-config --cflags glib-2.0`
|
|
else
|
|
glib_cflags=`glib-config --cflags`
|
|
fi
|
|
AC_SUBST(glib_cflags)
|
|
|
|
CXXFLAGS="$glib_cflags"
|
|
|
|
AC_MSG_CHECKING([for gpsim 0.21.4 availability])
|
|
AC_TRY_COMPILE(
|
|
[
|
|
#include <gpsim/interface.h>
|
|
#include <gpsim/gpsim_interface.h>
|
|
#include <gpsim/breakpoints.h>
|
|
#include <gpsim/gpsim_time.h>
|
|
void func() { (void)cycles; (void)initialize_gpsim_core(); (void)load_symbol_file(0,0); }
|
|
],
|
|
[],
|
|
AC_MSG_RESULT( yes )
|
|
have_gpsim_0_21_4=yes,
|
|
AC_MSG_RESULT( no )
|
|
)
|
|
|
|
AC_MSG_CHECKING([for gpsim 0.21.11 availability])
|
|
AC_TRY_COMPILE(
|
|
[
|
|
#include <gpsim/interface.h>
|
|
#include <gpsim/gpsim_interface.h>
|
|
#include <gpsim/breakpoints.h>
|
|
#include <gpsim/gpsim_time.h>
|
|
#include <gpsim/symbol.h>
|
|
#include <gpsim/program_files.h>
|
|
void func() { (void)cycles; (void)initialize_gpsim_core(); }
|
|
],
|
|
[],
|
|
AC_MSG_RESULT( yes )
|
|
have_gpsim_0_21_11=yes,
|
|
AC_MSG_RESULT( no )
|
|
)
|
|
|
|
AC_MSG_CHECKING([for gpsim 0.21.12 availability])
|
|
AC_TRY_COMPILE(
|
|
[
|
|
#include <gpsim/ValueCollections.h>
|
|
],
|
|
[],
|
|
AC_MSG_RESULT( yes )
|
|
have_gpsim_0_21_12=yes,
|
|
AC_MSG_RESULT( no )
|
|
)
|
|
|
|
CXXFLAGS="$ktechlab_save_CXXFLAGS"
|
|
AC_LANG_RESTORE
|
|
|
|
##############################
|
|
## END Check for gpsim 0.21 ##
|
|
##############################
|
|
|
|
|
|
|
|
################################
|
|
## BEGIN DO_NOT_COMPILE CHECK ##
|
|
################################
|
|
|
|
if test x$have_gpsim_0_21_12 == xyes; then
|
|
AC_DEFINE([GPSIM_0_21_12],[],[Gpsim 0.21.12 was found])
|
|
CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS"
|
|
else
|
|
if test x$have_gpsim_0_21_4 != xyes; then
|
|
if test x$have_gpsim_0_21_11 != xyes; then
|
|
AC_DEFINE([NO_GPSIM],[],[Gpsim was not found])
|
|
LIB_GPSIM=""
|
|
else
|
|
AC_DEFINE([GPSIM_0_21_11],[],[Gpsim 0.21.11 was found])
|
|
fi
|
|
else
|
|
AC_DEFINE([GPSIM_0_21_4],[],[Gpsim 0.21.4 was found])
|
|
fi
|
|
fi
|
|
|
|
if test x$have_gpsim_0_21_4 == xyes || test x$have_gpsim_0_21_11 == xyes || test x$have_gpsim_0_21_12 == xyes; then
|
|
wi_cv_lib_readline=no
|
|
ac_save_LIBS="$LIBS"
|
|
# Note: $LIBCURSES is permitted to be empty.
|
|
for LIBREADLINE in "-lreadline" "-lreadline $LIBCURSES" "-lreadline -ltermcap" "-lreadline -lncurses" "-lreadline -lcurses"
|
|
do
|
|
LIBS="$ac_save_LIBS $LIBREADLINE"
|
|
LIB_GPSIM="$LIBREADLINE -lgpsim -lgpsim_eXdbm -lgpsimcli -lgpsimgui"
|
|
AC_TRY_RUN([
|
|
/* program */
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
main(int argc, char **argv)
|
|
{
|
|
/* Note: don't actually call readline, since it may block;
|
|
* We just want to see if it (dynamic) linked in okay.
|
|
*/
|
|
if (argc == 0) /* never true */
|
|
readline(0);
|
|
exit(0);
|
|
}
|
|
],[
|
|
# action if true
|
|
wi_cv_lib_readline=yes
|
|
],[
|
|
# action if false
|
|
wi_cv_lib_readline=no
|
|
],[
|
|
# action if cross compiling
|
|
wi_cv_lib_readline=no
|
|
])
|
|
|
|
if test "$wi_cv_lib_readline" = yes ; then break ; fi
|
|
done
|
|
|
|
LIBS="$ac_save_LIBS"
|
|
fi
|
|
|
|
AC_SUBST(LIB_GPSIM)
|
|
|
|
##############################
|
|
## END DO_NOT_COMPILE CHECK ##
|
|
##############################
|
|
|