2 #-------------------------------------------------------------------
3 # Modified version of GUILE_FLAGS in guile.m4
4 # from the official guile distribution
5 #-------------------------------------------------------------------
7 AC_DEFUN([GUILE_FLAGS],[
8 ## The GUILE_FLAGS macro.
9 ## First, let's just see if we can find Guile at all.
10 AC_MSG_CHECKING(for Guile)
11 guile-config link > /dev/null || {
12 echo "configure: cannot find guile-config; is Guile installed?" 1>&2
15 GUILE_ORIGINAL_CFLAGS="`guile-config compile`"
16 GUILE_CFLAGS="$GUILE_ORIGINAL_CFLAGS"
17 GUILE_VARIANT_CFLAGS="$GUILE_ORIGINAL_CFLAGS $GUILE_ORIGINAL_CFLAGS/guile $GUILE_ORIGINAL_CFLAGS/libguile"
18 GUILE_LDFLAGS="`guile-config link`"
19 GUILE_VARIANT_LDFLAGS="-L`guile-config info libdir` -lguile -lreadline -ltermcap"
20 AC_SUBST(GUILE_CFLAGS)
21 AC_SUBST(GUILE_LDFLAGS)
25 #-------------------------------------------------------------------
26 # For autodetection of flags required to link statically with Guile
27 #-------------------------------------------------------------------
29 AC_DEFUN(TEXMACS_LINK_GUILE,
35 static void my_main (int argc, char** argv) {}
36 static void install_guile () {
38 gh_enter (0, NULL, (void (*)(...)) ((void*) my_main));
40 gh_enter (0, NULL, my_main);
44 dummy::install_guile ();
48 #-------------------------------------------------------------------
49 # Modify the X include files to make them C++-compatible, if needed
50 #-------------------------------------------------------------------
52 AC_DEFUN(CPP_X_HEADERS,[
53 AC_MSG_CHECKING(for C++-compatible X header files)
54 ac_save_cppflags="$CPPFLAGS"
55 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
56 AC_TRY_COMPILE([#include <X11/Xlib.h>
57 #include <X11/Xutil.h>],,
72 /usr/local/X11/include \
73 /usr/local/X11R6/include \
74 /usr/local/X11R5/include \
75 /usr/local/X11R4/include \
77 /usr/local/include/X11 \
78 /usr/local/include/X11R6 \
79 /usr/local/include/X11R5 \
80 /usr/local/include/X11R4 \
84 /usr/XFree86/include/X11 \
88 /usr/unsupported/include \
90 /usr/local/x11r5/include \
91 /usr/lpp/Xamples/include \
93 /usr/openwin/include \
94 /usr/openwin/share/include \
97 if test -r "$ac_dir/X11/Xlib.h"; then
102 sed 's/^extern \(X[[a-zA-Z0-9]]*(\)/extern int \1/' \
103 < "$tm_x_includes/X11/Xlib.h" > X11/Xlib.h
104 sed 's/^extern \(X[[a-zA-Z0-9]]*(\)/extern int \1/' \
105 < "$tm_x_includes/X11/Xutil.h" > X11/Xutil.h
106 X_CFLAGS="-I.. $X_CFLAGS"
108 CPPFLAGS="$ac_save_cppflags"
111 #-------------------------------------------------------------------
113 #-------------------------------------------------------------------
115 m4_include([misc/autotroll/autotroll.m4])
117 AC_DEFUN([HACKED_AT_WITH_QT],[
118 if test -r "/c/Qt"; then
119 moc_bin="`which moc`"
120 moc_dir="`dirname $moc_bin`"
121 qt_home="`dirname $moc_dir`"
122 QT_CPPFLAGS="-I$qt_home/mkspecs/macx-g++ -I$qt_home/include/QtCore -I$qt_home/include/QtGui -I$qt_home/include -I/$qt_home/include/ActiveQt -I."
123 QT_CXXFLAGS="-pipe -g -Wall -W -DQT_DLL -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT"
125 QT_LDFLAGS="-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -Wl,-subsystem,windows"
126 QT_LIBS="-L'c:$qt_home/lib' -lmingw32 -lqtmaind -lQtGuid4 -lQtCored4"
127 if test "$moc_bin" = ""; then