check fi -ljpeg is needed or not

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3870 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2002-03-31 14:52:58 +00:00
parent d0b4533078
commit 2635e40542
4 changed files with 146 additions and 115 deletions

View File

@ -1,3 +1,7 @@
2002-03-31 Lars Gullik Bjønnes <larsbj@birdstep.com>
* configure.in: call LYX_XFORMS_IMAGE_LOADER_NEEDS_JPEG
2002-03-27 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr> 2002-03-27 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* NEWS: small update * NEWS: small update
@ -298,9 +302,9 @@
2001-02-20 Edwin Leuven <leuven@fee.uva.nl> 2001-02-20 Edwin Leuven <leuven@fee.uva.nl>
* move latex preamble to guii xforms dir, see: * move latex preamble to guii xforms dir, see:
* src/ChangeLog * src/ChangeLog
* src/frontends/xforms/ChangeLog * src/frontends/xforms/ChangeLog
2001-02-13 Lars Gullik Bjønnes <larsbj@lyx.org> 2001-02-13 Lars Gullik Bjønnes <larsbj@lyx.org>

View File

@ -1,3 +1,8 @@
2002-03-31 Lars Gullik Bjønnes <larsbj@birdstep.com>
* lyxinclude.m4 (LYX_XFORMS_IMAGE_LOADER_NEEDS_JPEG): new macro
testing if libforms contains libjpeg or not.
2002-03-21 Angus Leeming <a.leeming@ic.ac.uk> 2002-03-21 Angus Leeming <a.leeming@ic.ac.uk>
* depcomp: fixed bug in dependency tracking for Tru64 Unix. * depcomp: fixed bug in dependency tracking for Tru64 Unix.
@ -171,4 +176,3 @@
* lyxinclude.m4 (LYX_PROG_CXX): do not use -fno-rtti for gcc * lyxinclude.m4 (LYX_PROG_CXX): do not use -fno-rtti for gcc
2.95.3. 2.95.3.

View File

@ -109,12 +109,12 @@ for ac_prog in $2 ; do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog ; ac_word=$[2] set dummy $ac_prog ; ac_word=$[2]
if test -z "[$]$1"; then if test -z "[$]$1"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
for ac_dir in $PATH; do for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=. test -z "$ac_dir" && ac_dir=.
if test -f [$ac_dir/$ac_word]; then if test -f [$ac_dir/$ac_word]; then
$1="$ac_prog" $1="$ac_prog"
break break
fi fi
done done
IFS="$ac_save_ifs" IFS="$ac_save_ifs"
@ -189,7 +189,7 @@ AC_ARG_ENABLE(debug,
### set up optimization ### set up optimization
AC_ARG_ENABLE(optimization, AC_ARG_ENABLE(optimization,
[ --enable-optimization[=value] enable compiler optimisation],, [ --enable-optimization[=value] enable compiler optimisation],,
enable_optimization=yes;) enable_optimization=yes;)
case $enable_optimization in case $enable_optimization in
yes) lyx_opt=-O;; yes) lyx_opt=-O;;
no) lyx_opt=;; no) lyx_opt=;;
@ -324,7 +324,7 @@ AC_CACHE_CHECK(for conforming std::count,lyx_cv_std_count,
using std::count; using std::count;
int countChar(char * b, char * e, char const c) int countChar(char * b, char * e, char const c)
{ {
return count(b, e, c); return count(b, e, c);
} }
],[ ],[
char a[] = "hello"; char a[] = "hello";
@ -363,7 +363,7 @@ AC_DEFUN(LYX_CXX_STL_STRING,[
AC_ARG_WITH(included-string, AC_ARG_WITH(included-string,
[ --with-included-string use LyX string class instead of STL string], [ --with-included-string use LyX string class instead of STL string],
[lyx_cv_with_included_string=$withval [lyx_cv_with_included_string=$withval
AC_MSG_RESULT([$with_included_string])], AC_MSG_RESULT([$with_included_string])],
[AC_CACHE_CHECK([],lyx_cv_with_included_string, [AC_CACHE_CHECK([],lyx_cv_with_included_string,
[AC_TRY_COMPILE([ [AC_TRY_COMPILE([
#include <string> #include <string>
@ -512,7 +512,7 @@ dnl Usage LYX_PATH_XPM: Checks for xpm library and header
AC_DEFUN(LYX_PATH_XPM,[ AC_DEFUN(LYX_PATH_XPM,[
### Check for Xpm library ### Check for Xpm library
AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage,XPM_LIB="-lXpm", AC_CHECK_LIB(Xpm, XpmCreateBufferFromImage,XPM_LIB="-lXpm",
[LYX_LIB_ERROR(libXpm,Xpm)], $XPM_LIB) [LYX_LIB_ERROR(libXpm,Xpm)], $XPM_LIB)
AC_SUBST(XPM_LIB) AC_SUBST(XPM_LIB)
### Check for Xpm headers ### Check for Xpm headers
lyx_cv_xpm_h_location="<xpm.h>" lyx_cv_xpm_h_location="<xpm.h>"
@ -539,18 +539,18 @@ EOF
case "$lyx_cv_xpmr" in case "$lyx_cv_xpmr" in
changequote(,) changequote(,)
[0-9]) lyxxpmr_alpha=`echo $lyx_cv_xpmr |tr 123456789 abcdefghi` [0-9]) lyxxpmr_alpha=`echo $lyx_cv_xpmr |tr 123456789 abcdefghi`
lyxxpmv_alpha=" (aka 3.$lyx_cv_xpmv$lyxxpmr_alpha)";; lyxxpmv_alpha=" (aka 3.$lyx_cv_xpmv$lyxxpmr_alpha)";;
changequote([,]) changequote([,])
*) ;; *) ;;
esac esac
lyx_cv_xpmversion="$lyx_cv_xpmv.$lyx_cv_xpmr$lyxxpmv_alpha" lyx_cv_xpmversion="$lyx_cv_xpmv.$lyx_cv_xpmr$lyxxpmv_alpha"
rm -f conftest*]) rm -f conftest*])
XPM_VERSION=${lyx_cv_xpmversion} XPM_VERSION=${lyx_cv_xpmversion}
case "$lyx_cv_xpmr" in case "$lyx_cv_xpmr" in
changequote(,) changequote(,)
[789]|[0-9][0-9]*) ;; [789]|[0-9][0-9]*) ;;
changequote([,]) changequote([,])
*) LYX_WARNING([Version $lyx_cv_xpmversion of the Xpm library is a bit old. *) LYX_WARNING([Version $lyx_cv_xpmversion of the Xpm library is a bit old.
If you experience strange crashes with LyX, try to upgrade If you experience strange crashes with LyX, try to upgrade
to at least version 4.7 (aka 3.4g). to at least version 4.7 (aka 3.4g).
If you have installed a newer version of the library, check whether you If you have installed a newer version of the library, check whether you
@ -595,7 +595,7 @@ rm -f conftest*])
XFORMS_VERSION=$lyx_cv_xfversion XFORMS_VERSION=$lyx_cv_xfversion
case "$lyx_cv_xfversion" in case "$lyx_cv_xfversion" in
"(unknown)"|0.8[1-7]*) "(unknown)"|0.8[1-7]*)
LYX_ERROR(dnl LYX_ERROR(dnl
Version $lyx_cv_xfversion of xforms is not compatible with LyX. Version $lyx_cv_xfversion of xforms is not compatible with LyX.
This version of LyX works best with versions 0.88 (recommended) and later.) ;; This version of LyX works best with versions 0.88 (recommended) and later.) ;;
0.88*) ;; 0.88*) ;;
@ -626,7 +626,29 @@ test $lyx_use_xforms_image_loader = yes && lyx_flags="$lyx_flags xforms-image-lo
### If the gui cannot load images itself, then we default to the ### If the gui cannot load images itself, then we default to the
### very simple one in graphics/GraphicsImageXPM.[Ch] ### very simple one in graphics/GraphicsImageXPM.[Ch]
AM_CONDITIONAL(USE_BASIC_IMAGE_LOADER, AM_CONDITIONAL(USE_BASIC_IMAGE_LOADER,
test $lyx_use_xforms_image_loader = no) test $lyx_use_xforms_image_loader = no)
])
dnl Check if the image loader needs libjpeg
AC_DEFUN(LYX_XFORMS_IMAGE_LOADER_NEEDS_JPEG,
[
if test "$lyx_use_xforms_image_loader" = "yes" ; then
AC_MSG_CHECKING([whether libjpeg is needed])
AC_LANG_SAVE
AC_LANG_C
save_LIBS=$LIBS
LIBS="$XFORMS_LIB $LIBS"
AC_TRY_LINK([#include <forms.h>],
[jpeg_abort(0);],
[lyx_need_jpeg=no],[lyx_need_jpeg=yes])
LIBS=$save_LIBS
AC_LANG_RESTORE
AC_MSG_RESULT($lyx_need_jpeg)
if test "$lyx_need_jpeg" = "yes" ; then
LIBS="-ljpeg $LIBS"
fi
fi
]) ])
@ -714,7 +736,7 @@ dnl Usage: LYX_LOOP_DIR(value,action)
dnl Executes action for values of variable `dir' in `values'. `values' can dnl Executes action for values of variable `dir' in `values'. `values' can
dnl use ":" as a separator. dnl use ":" as a separator.
AC_DEFUN(LYX_LOOP_DIR,[ AC_DEFUN(LYX_LOOP_DIR,[
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for dir in `eval "echo $1"`; do for dir in `eval "echo $1"`; do
if test ! "$dir" = NONE; then if test ! "$dir" = NONE; then
test ! -d "$dir" && AC_ERROR([\"$dir\" is not a directory]) test ! -d "$dir" && AC_ERROR([\"$dir\" is not a directory])
@ -749,7 +771,7 @@ AC_DEFUN(LYX_WITH_SIGC,
[AC_MSG_CHECKING(whether the included libsigc++ should be used) [AC_MSG_CHECKING(whether the included libsigc++ should be used)
AC_ARG_WITH([included-libsigc], AC_ARG_WITH([included-libsigc],
[ --without-included-libsigc [ --without-included-libsigc
Use the libsigc++ installed on the system], Use the libsigc++ installed on the system],
[lyx_use_included_libsigc=$withval], [lyx_use_included_libsigc=$withval],
[lyx_use_included_libsigc=yes]) [lyx_use_included_libsigc=yes])
AC_MSG_RESULT([$lyx_use_included_libsigc]) AC_MSG_RESULT([$lyx_use_included_libsigc])
@ -845,7 +867,7 @@ rm -f conftest*])
AC_DEFINE_UNQUOTED(STL_STRING_FWD_H_LOCATION,$lyx_cv_path_stl_string_fwd_h, AC_DEFINE_UNQUOTED(STL_STRING_FWD_H_LOCATION,$lyx_cv_path_stl_string_fwd_h,
[define this to the location of stl_string_fwd.h to be used with #include, [define this to the location of stl_string_fwd.h to be used with #include,
NOTE: Do not set it to <stl_string_fwd.h> as that will find the LyX NOTE: Do not set it to <stl_string_fwd.h> as that will find the LyX
supplied version of the header. supplied version of the header.
e.g. <../include/stl_string_fwd.h> or better yet use an absolute path])]) e.g. <../include/stl_string_fwd.h> or better yet use an absolute path])])
]) ])
@ -858,16 +880,16 @@ AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
AC_REQUIRE([AC_CANONICAL_SYSTEM]) AC_REQUIRE([AC_CANONICAL_SYSTEM])
AC_MSG_CHECKING([config.cache system type]) AC_MSG_CHECKING([config.cache system type])
if { test x"${ac_cv_host_system_type+set}" = x"set" && if { test x"${ac_cv_host_system_type+set}" = x"set" &&
test x"$ac_cv_host_system_type" != x"$host"; } || test x"$ac_cv_host_system_type" != x"$host"; } ||
{ test x"${ac_cv_build_system_type+set}" = x"set" && { test x"${ac_cv_build_system_type+set}" = x"set" &&
test x"$ac_cv_build_system_type" != x"$build"; } || test x"$ac_cv_build_system_type" != x"$build"; } ||
{ test x"${ac_cv_target_system_type+set}" = x"set" && { test x"${ac_cv_target_system_type+set}" = x"set" &&
test x"$ac_cv_target_system_type" != x"$target"; }; then test x"$ac_cv_target_system_type" != x"$target"; }; then
AC_MSG_RESULT([different]) AC_MSG_RESULT([different])
ifelse($#, 1, [$1], ifelse($#, 1, [$1],
[AC_MSG_ERROR(["you must remove config.cache and restart configure"])]) [AC_MSG_ERROR(["you must remove config.cache and restart configure"])])
else else
AC_MSG_RESULT([same]) AC_MSG_RESULT([same])
fi fi
ac_cv_host_system_type="$host" ac_cv_host_system_type="$host"
ac_cv_build_system_type="$build" ac_cv_build_system_type="$build"
@ -896,7 +918,7 @@ AC_DEFUN(LYX_FUNC_SELECT_ARGTYPES,
#include <sys/socket.h> #include <sys/socket.h>
#endif #endif
extern int select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl extern int select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5);],,dnl
[ac_not_found=no ; break 3],ac_not_found=yes) [ac_not_found=no ; break 3],ac_not_found=yes)
done done
done done
done done
@ -910,11 +932,11 @@ extern int select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func
fi fi
AC_MSG_RESULT([$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5]) AC_MSG_RESULT([$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5])
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1,$ac_cv_func_select_arg1, AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1,$ac_cv_func_select_arg1,
[Define to the type of arg1 for select().]) [Define to the type of arg1 for select().])
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234), AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234,($ac_cv_func_select_arg234),
[Define to the type of args 2, 3 and 4 for select().]) [Define to the type of args 2, 3 and 4 for select().])
AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5), AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5,($ac_cv_func_select_arg5),
[Define to the type of arg5 for select().]) [Define to the type of arg5 for select().])
]) ])
### Check which frontend we want to use. The default is XForms ### Check which frontend we want to use. The default is XForms
@ -923,7 +945,7 @@ AC_DEFUN(LYX_USE_FRONTEND,
[AC_MSG_CHECKING([what frontend should be used as main GUI]) [AC_MSG_CHECKING([what frontend should be used as main GUI])
AC_ARG_WITH(frontend, AC_ARG_WITH(frontend,
[ --with-frontend=THIS Use THIS frontend as main GUI: [ --with-frontend=THIS Use THIS frontend as main GUI:
Possible values: xforms, qt2, gnome], Possible values: xforms, qt2, gnome],
[lyx_use_frontend="$withval"], [lyx_use_frontend="xforms"]) [lyx_use_frontend="$withval"], [lyx_use_frontend="xforms"])
AC_MSG_RESULT($lyx_use_frontend) AC_MSG_RESULT($lyx_use_frontend)
AC_SUBST(FRONTEND) AC_SUBST(FRONTEND)
@ -945,10 +967,10 @@ tr_hdr=`echo $2 | tr . _`
AC_CACHE_VAL([lyx_cv_declare_${tr_hdr}_$1], AC_CACHE_VAL([lyx_cv_declare_${tr_hdr}_$1],
[AC_EGREP_HEADER($1, $2, [eval "lyx_cv_declare_${tr_hdr}_$1=yes"], [eval "lyx_cv_declare_${tr_hdr}_$1=no"])]) [AC_EGREP_HEADER($1, $2, [eval "lyx_cv_declare_${tr_hdr}_$1=yes"], [eval "lyx_cv_declare_${tr_hdr}_$1=no"])])
if eval "test \"\${lyx_cv_declare_${tr_hdr}_$1}\" = \"yes\""; then if eval "test \"\${lyx_cv_declare_${tr_hdr}_$1}\" = \"yes\""; then
AC_DEFINE_UNQUOTED(HAVE_DECL_${tr_func}) AC_DEFINE_UNQUOTED(HAVE_DECL_${tr_func})
AC_MSG_RESULT(yes) AC_MSG_RESULT(yes)
else else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi]) fi])
dnl This is the multiple headers version of the LYX_CHECK_DECL macro above. dnl This is the multiple headers version of the LYX_CHECK_DECL macro above.

View File

@ -255,6 +255,7 @@ fi
### For now, run this test always so config.h is unchanged by a change in ### For now, run this test always so config.h is unchanged by a change in
### frontend ### frontend
LYX_USE_XFORMS_IMAGE_LOADER LYX_USE_XFORMS_IMAGE_LOADER
LYX_XFORMS_IMAGE_LOADER_NEEDS_JPEG
### Setup GNU gettext ### Setup GNU gettext
dnl GNU gettext is written in C dnl GNU gettext is written in C