"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "aclocal.m4" between
TeXmacs-1.99.4-src.tar.gz and TeXmacs-1.99.5-src.tar.gz

About: GNU TeXmacs is a what-you-see-is-what-you-get scientific text editor, which was both inspired by TeX and GNU Emacs.

aclocal.m4  (TeXmacs-1.99.4-src):aclocal.m4  (TeXmacs-1.99.5-src)
# aclocal.m4 - Local adaptation and libs
# Denis RAUX LIX 2015
# due to compatibilty problem with regex in bash before 3.2,
# alway echo pattern string
m4_include([misc/m4/m4-ax_check_compile_flag.m4])
m4_include([misc/m4/m4-ax_append_flag.m4])
m4_include([misc/m4/m4-ax_save_flags.m4])
m4_include([misc/m4/m4-ax_restore_flags.m4])
m4_include([misc/m4/x11.m4])
m4_include([misc/m4/qt.m4])
m4_include([misc/m4/guile.m4])
m4_include([misc/m4/sparkle.m4])
m4_include([misc/m4/imlib2.m4])
m4_include([misc/m4/sql.m4])
m4_include([misc/m4/axel.m4])
m4_include([misc/m4/cairo.m4])
m4_include([misc/m4/gs.m4])
m4_include([misc/m4/hummus.m4])
m4_include([misc/m4/iconv.m4])
m4_include([misc/m4/freetype.m4])
m4_include([misc/m4/dlopen.m4])
#------------------------------------------------------------------- #-------------------------------------------------------------------
# Modified version of GUILE_FLAGS in guile.m4 # General functions
# from the official guile distribution
#------------------------------------------------------------------- #-------------------------------------------------------------------
# Create local variable based on those located in config.h
AC_DEFUN([GUILE_FLAGS],[ AC_DEFUN([LC_DEFINE],[
## The GUILE_FLAGS macro. typeset $1="$2"
## First, let's just see if we can find Guile at all. AC_DEFINE($1,$2,$3)
AC_MSG_CHECKING(for Guile)
GUILE_BIN="guile18"
GUILE_CONFIG="guile18-config"
guile18-config link > /dev/null || {
GUILE_BIN="guile"
GUILE_CONFIG="guile-config"
guile-config link > /dev/null || {
echo "configure: cannot find guile-config; is Guile installed?" 1>&2
exit 1
}
}
GUILE_ORIGINAL_CFLAGS="`$GUILE_CONFIG compile`"
GUILE_CFLAGS="$GUILE_ORIGINAL_CFLAGS"
GUILE_VARIANT_CFLAGS="$GUILE_ORIGINAL_CFLAGS $GUILE_ORIGINAL_CFLAGS/guile $GUI
LE_ORIGINAL_CFLAGS/libguile"
GUILE_LDFLAGS="`$GUILE_CONFIG link`"
GUILE_VARIANT_LDFLAGS="-L`$GUILE_CONFIG info libdir` -lguile -lreadline -lterm
cap"
AC_SUBST(GUILE_CFLAGS)
AC_SUBST(GUILE_LDFLAGS)
AC_MSG_RESULT(yes)
]) ])
#------------------------------------------------------------------- # checking function without extra display before result
# For autodetection of flags required to link statically with Guile m4_define([LS_SAVE_DESC],[3])
#------------------------------------------------------------------- AC_DEFUN([LC_MSG_CHECKING],[
AC_MSG_CHECKING([$1])
exec LS_SAVE_DESC>&AS_MESSAGE_FD AS_MESSAGE_FD>/dev/null
])
AC_DEFUN([LC_MSG_RESULT],[
exec AS_MESSAGE_FD>&LS_SAVE_DESC
AC_MSG_RESULT([$1])
])
AC_DEFUN(TEXMACS_LINK_GUILE, AC_DEFUN([LC_SUBST],[
[AC_TRY_LINK([ AC_SUBST([$1_CXX],[$$1_CXXFLAGS])
#include <guile/gh.h> AC_SUBST([$1_CPP],[$$1_CPPFLAGS])
$CONFIG_DOTS if [[[ $enable_dumpflags =~ $(echo (^|[[:space:]])($1|ALL)LC_SET_TRIVIAL_FLAGS
],[ ($|[[:space:]])) ]]]
struct dummy { then LC_DUMP_FLAGS([$1])
static void my_main (int argc, char** argv) {} fi
static void install_guile () { # adaptation layer remove when finished
#ifdef DOTS_OK AC_SUBST([$1_CFLAGS],["$$1_CXXFLAGS $$1_CPPFLAGS"])
gh_enter (0, NULL, (void (*)(...)) ((void*) my_main)); AC_SUBST([$1_LDFLAGS],[""])
#else
gh_enter (0, NULL, my_main);
#endif
}
};
dummy::install_guile ();
], $1, $2)
]) ])
#------------------------------------------------------------------- # remove unwanted space in well know flags
# Modify the X include files to make them C++-compatible, if needed AC_DEFUN([LC_NORMALIZE_FLAG], [
#------------------------------------------------------------------- $1=$(echo $$1) # normalize whitespaces
$1=${$1//\/\//\/} # normalize path separator
AC_DEFUN(CPP_X_HEADERS,[ if @<:@@<:@ "$$1" =~ [$(echo "^-(l|L|D)[[:space:]]+([^[:space:]].*)$"]) @:>@@:
AC_MSG_CHECKING(for C++-compatible X header files) >@
ac_save_cppflags="$CPPFLAGS" then $1=-${BASH_REMATCH[[1]]}${BASH_REMATCH[[2]]}
CPPFLAGS="$CPPFLAGS $X_CFLAGS" fi
AC_TRY_COMPILE([#include <X11/Xlib.h>
#include <X11/Xutil.h>],,
echo yes,
[rm -rf X11
mkdir X11
for ac_dir in \
/usr/X11/include \
/usr/X11R6/include \
/usr/X11R5/include \
/usr/X11R4/include \
\
/usr/include/X11 \
/usr/include/X11R6 \
/usr/include/X11R5 \
/usr/include/X11R4 \
\
/usr/local/X11/include \
/usr/local/X11R6/include \
/usr/local/X11R5/include \
/usr/local/X11R4/include \
\
/usr/local/include/X11 \
/usr/local/include/X11R6 \
/usr/local/include/X11R5 \
/usr/local/include/X11R4 \
\
/usr/X386/include \
/usr/x386/include \
/usr/XFree86/include/X11 \
\
/usr/include \
/usr/local/include \
/usr/unsupported/include \
/usr/athena/include \
/usr/local/x11r5/include \
/usr/lpp/Xamples/include \
\
/usr/openwin/include \
/usr/openwin/share/include \
; \
do
if test -r "$ac_dir/X11/Xlib.h"; then
tm_x_includes=$ac_dir
break
fi
done
sed 's/^extern \(X[[a-zA-Z0-9]]*(\)/extern int \1/' \
< "$tm_x_includes/X11/Xlib.h" > X11/Xlib.h
sed 's/^extern \(X[[a-zA-Z0-9]]*(\)/extern int \1/' \
< "$tm_x_includes/X11/Xutil.h" > X11/Xutil.h
X_CFLAGS="-I.. $X_CFLAGS"
echo "no; fixing"])
CPPFLAGS="$ac_save_cppflags"
]) ])
#------------------------------------------------------------------- # append flag ($1) to ($2)
# Support for Qt # authorize some duplicate according to the pattern
#------------------------------------------------------------------- AC_DEFUN([LC_APPEND_FLAG],[
if @<:@@<:@ "$1" =~ $(echo "^[[:space:]]*-Wl,.+") @:>@@:>@
then $2="$$2 $1"
else AX_APPEND_FLAG([$1],[$2])
fi
])
m4_include([misc/autotroll/autotroll.m4]) #############################################################################
# generic get flag $2 from $1 line $3 line flag separator
AC_DEFUN([LC_GETPOP_FLAG],[
m4_ifblank([$3], [[$0]_sepa=-], [[$0]_sepa=[$3]])
[$0]_1=" $(echo $$1)" # remove unnecessary spaces and add a heading space
$1=${[$0]_1@&t@GETPOP $[$0]_sepa*} # get heading
if test "$$1" = "$[$0]_1"
then $1=${$1@%:@}; unset $2 # flag not found
else
[$0]_tail=${[$0]_1@%:@$$1 } # strip heading
$2=${[$0]_tail%% -*} # get flag and data
if test "$$2" = "$[$0]_tail" # is there someting after the flag
then $1=$(echo $$1)
else $1=$(echo $$1${[$0]_tail@%:@$$2})
fi
LC_NORMALIZE_FLAG([$2])
if [[ $$0_sepa != - ]] # just return the value
then $2=${$2@%:@$[$0]_sepa}
fi
fi
unset ${![$0]_*}
])
AC_DEFUN([HACKED_AT_WITH_QT],[ # generic get flag $2 from $1 line $3 line flag separator (left most element)
#QT has the install dir hard coded in library so we need to fix it manually for m4_define([LC_GET_FLAG],[m4_define([GETPOP],[%%]) LC_GETPOP_FLAG([$1],[$2],[$3])
relocatable environment ])
if test -z $TMBUILDENV # generic get flag $2 from $1 line $3 line flag separator (right most element)
then AT_WITH_QT m4_define([LC_POP_FLAG],[m4_define([GETPOP],[%]) LC_GETPOP_FLAG([$1],[$2],[$3])]
# MacOS specific: (FIXME! shouldn't we be using qmake -query everywhere?) )
QT_FRAMEWORKS_PATH=`$QMAKE -query QT_INSTALL_LIBS`
QT_PLUGINS_PATH=`$QMAKE -query QT_INSTALL_PLUGINS` #############################################################################
if [[[ $QT_CFLAGS =~ mmacosx-version-min= ]]]
then MACOSX_DEPLOYMENT_TARGET="${QT_CFLAGS#*mmacosx-version-min=}" #############################################################################
MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET%% *} # wrapping AC_?_IFELSE for erro smg
fi AC_DEFUN([LC_X_IFELSE],[
AC_SUBST(MACOSX_DEPLOYMENT_TARGET) AC_MSG_CHECKING([$2] linking)
AC_$1_IFELSE([$3], [
AC_MSG_RESULT(yes)
$4
],[
AC_MSG_RESULT(no)
$5
])])
AC_DEFUN([LC_RUN_IFELSE],[LC_X_IFELSE([RUN],[$1],[$2],[$3],[$4],[$5])])
AC_DEFUN([LC_LINK_IFELSE],[LC_X_IFELSE([LINK],[$1],[$2],[$3],[$4],[$5])])
AC_DEFUN([LC_COMPILE_IFELSE],[LC_X_IFELSE([COMPILE],[$1],[$2],[$3],[$4],[$5])])
#############################################################################
m4_define([lib_ext],[dylib])
AC_DEFUN([lc_lib_name],[m4_tolower($1)])
# Trivial compile flags setting for the LIBRARY ($1) in rep ($2)
AC_DEFUN([LC_SET_TRIVIAL_FLAGS],[
if [[ "$2" ]]
then
LC_SCATTER_FLAGS([-I$2/include -L$2/lib -l[]lc_lib_name([$1])],[$1])
else else
#windows part LC_SCATTER_FLAGS([-l[]lc_lib_name([$1])],[$1])
QT_FRAMEWORKS_PATH=/Qt
QT_PATH=$QT_FRAMEWORKS_PATH/bin
QT_PLUGINS_PATH=$QT_FRAMEWORKS_PATH/plugins
QT_LIBS="-L/Qt/lib -lmingw32 -lQtGui4 -lQtCore4 -lpoppler-qt4"
MOCFLAGS="-DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_L
IB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -D
QT_HAVE_SSE2 -DQT_THREAD_SUPPORT"
QT_DEFINES="-DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI
_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT
-DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT"
QT_CPPFLAGS="$QT_DEFINES -I/Qt/include -I/Qt/include/Qt -I/Qt/include/QtCore
-I/Qt/include/QtGui"
QT_CXXFLAGS="-O2 -frtti -fexceptions -mthreads -Wall $QT_DEFINES"
QT_CFLAGS="-O2 -Wall $QT_DEFINES"
MOCFLAGS=$QT_DEFINES
MOC=$QT_PATH/moc
QMAKE=$QT_PATH/qmake
fi fi
]) ])
#############################################################################
# prepend a anonymous list into library FLAGS
# LC_APPEND_FLAG is used to avoid duplicate flag
# $1 anonymous list $2 destination
AC_DEFUN([LC_PREPEND_LIST],[
[$0]_list="$1"
#pop the old list
LC_POP_FLAG([$2],[$0_flag])
while @<:@@<:@ $[$0]_flag @:>@@:>@
do LC_APPEND_FLAG([$$0_flag],[$0_nlist])
LC_POP_FLAG([$2],[$0_flag])
done
# append new list
LC_POP_FLAG([$0_list],[$0_flag])
while @<:@@<:@ $[$0]_flag @:>@@:>@
do LC_APPEND_FLAG([$$0_flag],[$0_nlist])
LC_POP_FLAG([$0_list],[$0_flag])
done
$2=
LC_GET_FLAG([$0_nlist],[$0_flag])
while @<:@@<:@ $[$0]_flag @:>@@:>@
do $2="$[$0]_flag $$2"
LC_GET_FLAG([$0_nlist],[$0_flag])
done
unset ${![$0]_*}
])
#############################################################################
# merge a anonymous list into library FLAGS
# $1 list $2 destination
AC_DEFUN([LC_MERGE_FLAGS],[
[$0]_list="$1"
if @<:@@<:@ "$2" =~ $(echo "(^|_)LIBS") @:>@@:>@
then LC_PREPEND_LIST([$1],[$2])
else while @<:@ "$[$0]_list" @:>@
do LC_GET_FLAG([$0_list],[$0_flag])
LC_APPEND_FLAG([$$0_flag],[$2])
done
fi
unset ${![$0]_*}
])
#############################################################################
# Groups flags definition
m4_define([superseded_flags],[[CFLAGS],[CXXFLAGS],[CPPFLAGS]])
m4_define([merged_flags],[[LDFLAGS],[LIBS]])
m4_define([all_flags],[superseded_flags, merged_flags])
# generic transfert flag $1 within the superseded list $2 and the merged list $3
AC_DEFUN([_LC_TRANSFERT_FLAGS],
[m4_foreach([_tmp1], [$2], [ if @<:@ "$$1_[]_tmp1" @:>@; then _tmp1=$$1_[]_tmp
1;fi;])]
[m4_foreach([_tmp1], [$3], [LC_MERGE_FLAGS([$$1_[]_tmp1], [_tmp1])])]
)
# set compile flags from the LIBRARY ($1) flags into standard flags
# in order to test static linking set the -static if needed
AC_DEFUN([LC_SET_FLAGS],[
_LC_TRANSFERT_FLAGS([$1],[superseded_flags,[LIBS]],[LDFLAGS])
if test -n "$LNSTATIC"
then LC_APPEND_FLAG([-static], [CFLAGS])
LC_APPEND_FLAG([-static], [CXXFLAGS])
fi
# check the libs depencies
[$0]_libs=$$1_LIBS
LC_GET_FLAG([$0_libs], [$0_lib], [-l]) # the main lib
LC_POP_FLAG([$0_libs], [$0_dep], [-l]) # the dependency lib
while test -n "$[$0]_dep"
do _LC_CHECK_LIB([$$0_dep])
LC_POP_FLAG([$0_libs], [$0_dep], [-l]) # the dependency lib
done
LC_MERGE_FLAGS(-l$[$0_lib],[LIBS])
])
# merge the LIBRARY ($1) flags into general compile flags
# The Bstatic option is added if $2 is undef
AC_DEFUN([LC_COMBINE_FLAGS],[
if [[ -z "$2" -a -n "$SEMISTATIC" ]]
then [$1]_LIBS="$SEMISTATIC $[$1]_LIBS $SEMIDYNAMIC"
fi
_LC_TRANSFERT_FLAGS([$1],[],[merged_flags])
unset ${![$0]_*}
])
# supersede the $2 empty flags by $1 flags
AC_DEFUN([LC_SET_EMPTY_FLAGS],[
m4_foreach([_tmp1], [all_flags], [$2_[]_tmp1=${$2_[]_tmp1:-${$1_[]_tmp1}};])])
# raw copy flags from $1 to $2
AC_DEFUN([LC_COPY_FLAGS],[
m4_foreach([_tmp1], [all_flags], [$2_[]_tmp1="${$1_[]_tmp1}";])])
# Delete the LIBRARY ($1) flags
AC_DEFUN([LC_CLEAR_FLAGS],[
m4_ifblank([$1],[m4_define([_tmp2])],[m4_define([_tmp2],[_])])
m4_foreach([_tmp1], [all_flags],[unset $1[]_tmp2[]_tmp1;])])
# raw compare flags in $1 and $2
AC_DEFUN([LC_EQ_FLAGS],[@<:@ dnl
m4_foreach([_tmp1], [all_flags], ["${$2_[]_tmp1}" == "${$1_[]_tmp1}" -a ])dn
l
: @:>@
])
#############################################################################
# try to use the $1 library
# test only works for predefines libraries
# If the library is unknown just a warning is issued
m4_define([Lib_check_fail],[AC_MSG_ERROR(compulsory library [$1] not found)])
m4_define([Lib_check_nfound],[AC_MSG_NOTICE(skipping presence test for the libra
ry [$1])])
AC_DEFUN([_LC_CHECK_LIB],[
case $1 in
z@:}@ AC_CHECK_LIB([z], [inflate], [], [Lib_check_fail($1)]);;
png@:}@ AC_CHECK_LIB([png], [png_read_png], [], [Lib_check_fail($1)]);;
png12@:}@ AC_CHECK_LIB([png12], [png_read_png], [], [Lib_check_fail($1)]);;
gmp@:}@ AC_CHECK_LIB([gmp], [__gmpf_init], [], [Lib_check_fail($1)]);;
*@:}@ Lib_check_nfound($1) LC_MERGE_FLAGS(-l[$1],[LIBS]);;
esac
])
AC_DEFUN([LC_CHECK_LIB],[
AC_MSG_ERROR([$1:$2:$5:LIBS])
AC_CHECK_LIB([$1],[$2],[$3],[
m4_ifndef([$5],[$4],[
LC_GET_FLAG([$5],[$0]_NEWLIB)
LC_APPEND_FLAG([$0]_NEWLIB, [LIBS])
LC_CHECK_LIB([$1],[$2],[$3],[$4],[$5])
])
])
])
#############################################################################
# build the lib name with a underscore if needed
m4_define([lc_libname],[m4_ifblank([$1],[$2],[$1_$2])])
#dispatch compil flags list $1 in a LIBRARY ($2) flags
#
AC_DEFUN([LC_SCATTER_FLAGS],[
[$0]_list="$1"
LC_GET_FLAG([$0_list], [$0_flag])
while test -n "$[$0]_flag"
do
case "$[$0]_flag" in
-l*@:}@ LC_APPEND_FLAG([$[$0]_flag],[lc_libname([$2],[LIBS])]);;
-L*|-framework*@:}@ LC_APPEND_FLAG([$[$0]_flag],[lc_libname([$2],[LDFLAGS]
)]);;
-I*|-U*|-D*@:}@ LC_APPEND_FLAG([$[$0]_flag],[lc_libname([$2],[CPPFLAGS])])
;;
-F*@:}@ LC_APPEND_FLAG([$[$0]_flag],[lc_libname([$2],[CPPFLAGS])]);;
-Wl,-F*@:}@ LC_APPEND_FLAG([$[$0]_flag],[lc_libname([$2],[LDFLAGS])]);;
-Wl,*@:}@ AC_MSG_WARN(Flag $[$0]_flag dropped for lib $2);;
-*@:}@
AX_CHECK_COMPILE_FLAG($[$0]_flag,[LC_APPEND_FLAG([$[$0]_flag],[lc_libnam
e([$2],[CXXFLAGS])])],[AC_MSG_WARN(Flag $[$0]_flag dropped)],[],[]);;
*@:}@ AC_MSG_WARN(Flags $[$0]_flag NOT managed);;
esac
LC_GET_FLAG([$0_list], [$0_flag])
done
unset ${![$0]_*}
])
#############################################################################
# Dump flags
AC_DEFUN([_LC_DUMP_FLAGS], [
m4_foreach([_tmp1], [[CFLAGS], [CXXFLAGS], [CPPFLAGS], [LIBS], [LDFLAGS]],
[AC_MSG_NOTICE([$1[]_tmp1:$$1[]_tmp1])
])
])
AC_DEFUN([LC_DUMP_FLAGS], [m4_ifblank([$1],[_LC_DUMP_FLAGS],[_LC_DUMP_FLAGS([$1_
])])])
# get arg value from a args list
# $1 args list $2 arg $3 arg value
AC_DEFUN([LC_GET_ARG_VALUE], [
if @<:@@<:@ "$$1" =~ $(echo "(^|[[[:space:]]]+)$2(=?|[[[:space:]]]*)(.*)$")
@:>@@:>@
then $3=${BASH_REMATCH[[3]]%% -*}
$3=${$3%% } # strip tailing blanks
else unset $3
fi
])
# remove all occurrence of arg from a args list
# $1 args list to clean $2 arg to remove
AC_DEFUN([STRIP_ARG], [
unset [$0]_memo
if test "$$1" = "$2"
then $1=
else while test "$$1" != "$[$0]_memo"
do [$0]_memo="$$1"
$1="${$1/@%:@$2[[[:space:]]]/}" # at the beginning
$1="${$1/%[[[:space:]]]$2/}" # at the end
$1="${$1//[[[:space:]]]$2[[[:space:]]]/ }" # all in the middle no conse
cutive
done
fi
$1=$(echo $$1) # wipe extra blank if any
unset ${![$0]_*}
])
# remove multiple occurrences of arg from a args list
# $1 args list to clean $2 args to remove
AC_DEFUN([STRIP_ALL_ARGS], [
unset [$0]_list
for [$0]_arg in "$2"
do while @<:@@<:@ $$1 != $[$0]_list @:>@@:>@
do [$0]_list=$$1
STRIP_ARG([$1],[$[$0]_arg])
done
done
unset ${![$0]_*}
])
#------------------------------------------------------------------- #-------------------------------------------------------------------
# Support for stack traces # Support for stack traces
#------------------------------------------------------------------- #-------------------------------------------------------------------
AC_DEFUN([AC_CPLUSPLUS_STACK],[ AC_DEFUN([AC_CPLUSPLUS_STACK],[
AC_MSG_CHECKING(for C++ stack backtrace support) AC_MSG_CHECKING(for C++ stack backtrace support)
AC_RUN_IFELSE([AC_LANG_PROGRAM([ AC_RUN_IFELSE([AC_LANG_PROGRAM([
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <execinfo.h> #include <execinfo.h>
 End of changes. 12 change blocks. 
142 lines changed or deleted 340 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS