mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Get rid of LYX_ERROR in our configure file.
We use the standard AC_MSG_ERROR instead, which just stops the configure process where the problem happens.
This commit is contained in:
parent
1d08d5232d
commit
04a8db4af8
@ -19,7 +19,7 @@ AC_ARG_ENABLE(build-type,
|
|||||||
prof*) build_type=profiling;;
|
prof*) build_type=profiling;;
|
||||||
gprof*) build_type=gprof;;
|
gprof*) build_type=gprof;;
|
||||||
rel*) build_type=release;;
|
rel*) build_type=release;;
|
||||||
*) AC_ERROR([Bad build type specification \"$enableval\". Please use one of rel(ease), pre(release), dev(elopment), prof(iling), or gprof]);;
|
*) AC_MSG_ERROR([bad build type specification \"$enableval\". Please use one of rel(ease), pre(release), dev(elopment), prof(iling), or gprof]);;
|
||||||
esac],
|
esac],
|
||||||
[case AC_PACKAGE_VERSION in
|
[case AC_PACKAGE_VERSION in
|
||||||
*svn*|*dev*) build_type=development;;
|
*svn*|*dev*) build_type=development;;
|
||||||
@ -61,15 +61,6 @@ AC_MSG_RESULT([$withval])
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl Usage: LYX_ERROR(message) Displays the warning "message" and sets the
|
|
||||||
dnl flag lyx_error to yes.
|
|
||||||
AC_DEFUN([LYX_ERROR],[
|
|
||||||
lyx_error_txt="$lyx_error_txt
|
|
||||||
** $1
|
|
||||||
"
|
|
||||||
lyx_error=yes])
|
|
||||||
|
|
||||||
|
|
||||||
dnl Usage: LYX_WARNING(message) Displays the warning "message" and sets the
|
dnl Usage: LYX_WARNING(message) Displays the warning "message" and sets the
|
||||||
dnl flag lyx_warning to yes.
|
dnl flag lyx_warning to yes.
|
||||||
AC_DEFUN([LYX_WARNING],[
|
AC_DEFUN([LYX_WARNING],[
|
||||||
@ -82,36 +73,20 @@ lyx_warning=yes])
|
|||||||
dnl Usage: LYX_LIB_ERROR(file,library) Displays an error message indication
|
dnl Usage: LYX_LIB_ERROR(file,library) Displays an error message indication
|
||||||
dnl that 'file' cannot be found because 'lib' may be uncorrectly installed.
|
dnl that 'file' cannot be found because 'lib' may be uncorrectly installed.
|
||||||
AC_DEFUN([LYX_LIB_ERROR],[
|
AC_DEFUN([LYX_LIB_ERROR],[
|
||||||
LYX_ERROR([Cannot find $1. Please check that the $2 library
|
AC_MSG_ERROR([cannot find $1. Please check that the $2 library
|
||||||
is correctly installed on your system.])])
|
is correctly installed on your system.])])
|
||||||
|
|
||||||
|
|
||||||
dnl Usage: LYX_CHECK_ERRORS Displays a warning message if a LYX_ERROR
|
dnl Usage: LYX_CHECK_WARNINGS Displays a warning message if a LYX_WARNING
|
||||||
dnl has occured previously.
|
dnl has occured previously.
|
||||||
AC_DEFUN([LYX_CHECK_ERRORS],[
|
AC_DEFUN([LYX_CHECK_WARNINGS],[
|
||||||
if test x$lyx_warning = xyes; then
|
if test x$lyx_warning = xyes; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
=== The following minor problems have been detected by configure.
|
=== The following minor problems have been detected by configure.
|
||||||
=== Please check the messages below before running 'make'.
|
=== Please check the messages below before running 'make'.
|
||||||
=== (see the section 'Problems' in the INSTALL file)
|
=== (see the section 'Problems' in the INSTALL file)
|
||||||
$lyx_warning_txt
|
$lyx_warning_txt
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
if test x$lyx_error = xyes; then
|
|
||||||
cat <<EOF
|
|
||||||
**** The following problems have been detected by configure.
|
|
||||||
**** Please check the messages below before running 'make'.
|
|
||||||
**** (see the section 'Problems' in the INSTALL file)
|
|
||||||
$lyx_error_txt
|
|
||||||
$lyx_warning_txt
|
|
||||||
EOF
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
|
|
||||||
cat <<EOF
|
|
||||||
Configuration of LyX was successful.
|
|
||||||
Type 'make' to compile the program,
|
|
||||||
and then 'make install' to install it.
|
|
||||||
EOF
|
EOF
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
@ -354,7 +329,7 @@ AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
|
|||||||
else
|
else
|
||||||
BOOST_MT=""
|
BOOST_MT=""
|
||||||
if test x$lyx_boost_plain != xyes ; then
|
if test x$lyx_boost_plain != xyes ; then
|
||||||
LYX_ERROR([No suitable boost library found (do not use --without-included-boost)])
|
AC_MSG_ERROR([cannot find suitable boost library (do not use --without-included-boost)])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AC_SUBST(BOOST_MT)
|
AC_SUBST(BOOST_MT)
|
||||||
@ -384,7 +359,7 @@ AC_DEFUN([LYX_USE_INCLUDED_MYTHES],[
|
|||||||
fi
|
fi
|
||||||
AC_LANG_POP(C++)
|
AC_LANG_POP(C++)
|
||||||
if test x$lyx_mythes != xyes -o x$ac_cv_header_mythes_h != xyes; then
|
if test x$lyx_mythes != xyes -o x$ac_cv_header_mythes_h != xyes; then
|
||||||
LYX_ERROR([No suitable MyThes library found (do not use --without-included-mythes)])
|
AC_MSG_ERROR([cannot find suitable MyThes library (do not use --without-included-mythes)])
|
||||||
fi
|
fi
|
||||||
AC_DEFINE(USE_EXTERNAL_MYTHES, 1, [Define as 1 to use an external MyThes library])
|
AC_DEFINE(USE_EXTERNAL_MYTHES, 1, [Define as 1 to use an external MyThes library])
|
||||||
AC_DEFINE_UNQUOTED(MYTHES_H_LOCATION,$lyx_cv_mythes_h_location,[Location of mythes.hxx])
|
AC_DEFINE_UNQUOTED(MYTHES_H_LOCATION,$lyx_cv_mythes_h_location,[Location of mythes.hxx])
|
||||||
@ -485,7 +460,7 @@ AC_ARG_WITH(frontend,
|
|||||||
[FRONTENDS="$withval"],[FRONTENDS="qt4"])
|
[FRONTENDS="$withval"],[FRONTENDS="qt4"])
|
||||||
if test "x$FRONTENDS" = x ; then
|
if test "x$FRONTENDS" = x ; then
|
||||||
AC_MSG_RESULT(none)
|
AC_MSG_RESULT(none)
|
||||||
AC_ERROR("Please select a frontend using --with-frontend")
|
AC_MSG_ERROR("Please select a frontend using --with-frontend")
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($FRONTENDS)
|
AC_MSG_RESULT($FRONTENDS)
|
||||||
AC_SUBST(FRONTENDS)
|
AC_SUBST(FRONTENDS)
|
||||||
@ -541,7 +516,7 @@ case $lyx_use_packaging in
|
|||||||
*apple-darwin*) lyx_install_macosx=true ;;
|
*apple-darwin*) lyx_install_macosx=true ;;
|
||||||
esac
|
esac
|
||||||
lyx_install_posix=true ;;
|
lyx_install_posix=true ;;
|
||||||
*) LYX_ERROR([Unknown packaging type $lyx_use_packaging]) ;;
|
*) AC_MSG_ERROR([unknown packaging type $lyx_use_packaging.]) ;;
|
||||||
esac
|
esac
|
||||||
AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
|
AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
|
||||||
AM_CONDITIONAL(INSTALL_WINDOWS, $lyx_install_windows)
|
AM_CONDITIONAL(INSTALL_WINDOWS, $lyx_install_windows)
|
||||||
|
@ -52,9 +52,7 @@ AC_DEFUN([QT4_CHECK_COMPILE],
|
|||||||
|
|
||||||
if test -z "$qt4_cv_libname"; then
|
if test -z "$qt4_cv_libname"; then
|
||||||
AC_MSG_RESULT([failed])
|
AC_MSG_RESULT([failed])
|
||||||
if test "$FATAL" = 1 ; then
|
AC_MSG_ERROR([cannot compile a simple Qt 4 executable. Check you have the right \$QT4DIR.])
|
||||||
AC_MSG_ERROR([Cannot compile a simple Qt 4 executable. Check you have the right \$QT4DIR !])
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT([$qt4_cv_libname])
|
AC_MSG_RESULT([$qt4_cv_libname])
|
||||||
fi
|
fi
|
||||||
@ -92,10 +90,6 @@ AC_DEFUN([QT4_DO_IT_ALL],
|
|||||||
dnl this variable is precious
|
dnl this variable is precious
|
||||||
AC_ARG_VAR(QT4DIR, [the place where the Qt 4 files are, e.g. /usr/lib/qt4])
|
AC_ARG_VAR(QT4DIR, [the place where the Qt 4 files are, e.g. /usr/lib/qt4])
|
||||||
|
|
||||||
dnl Please leave this alone. I use this file in
|
|
||||||
dnl oprofile.
|
|
||||||
FATAL=0
|
|
||||||
|
|
||||||
AC_ARG_WITH(qt4-dir, [AC_HELP_STRING([--with-qt4-dir], [where the root of Qt 4 is installed])],
|
AC_ARG_WITH(qt4-dir, [AC_HELP_STRING([--with-qt4-dir], [where the root of Qt 4 is installed])],
|
||||||
[ qt4_cv_dir=`eval echo "$withval"/` ])
|
[ qt4_cv_dir=`eval echo "$withval"/` ])
|
||||||
|
|
||||||
@ -143,7 +137,7 @@ AC_DEFUN([QT4_DO_IT_ALL],
|
|||||||
|
|
||||||
dnl Check qt version
|
dnl Check qt version
|
||||||
AS_VERSION_COMPARE($QT4_VERSION, $1,
|
AS_VERSION_COMPARE($QT4_VERSION, $1,
|
||||||
[LYX_ERROR([LyX requires version $1 of Qt. Only version $QT4_VERSION has been found.])
|
[AC_MSG_ERROR([LyX requires at least version $1 of Qt. Only version $QT4_VERSION has been found.])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_PATH_PROGS(MOC4, [moc-qt4 moc],[],$qt4_cv_bin:$PATH)
|
AC_PATH_PROGS(MOC4, [moc-qt4 moc],[],$qt4_cv_bin:$PATH)
|
||||||
@ -193,7 +187,7 @@ AC_DEFUN([QT4_DO_MANUAL_CONFIG],
|
|||||||
case $have_x in
|
case $have_x in
|
||||||
yes) LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
|
yes) LIBS="$X_PRE_LIBS $LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
|
||||||
CPPFLAGS="$CPPFLAGS $X_CFLAGS";;
|
CPPFLAGS="$CPPFLAGS $X_CFLAGS";;
|
||||||
no) LYX_ERROR([Cannot find X window libraries and/or headers.]);;
|
no) AC_MSG_ERROR([cannot find X window libraries and/or headers.]);;
|
||||||
disable) ;;
|
disable) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
28
configure.ac
28
configure.ac
@ -105,7 +105,7 @@ AC_CHECK_SIZEOF(wchar_t)
|
|||||||
### We need iconv for unicode support (Qt4 frontend requires it too)
|
### We need iconv for unicode support (Qt4 frontend requires it too)
|
||||||
AM_ICONV
|
AM_ICONV
|
||||||
if test "$am_cv_func_iconv" = no; then
|
if test "$am_cv_func_iconv" = no; then
|
||||||
LYX_ERROR([Cannot find required library iconv])
|
AC_MSG_ERROR([cannot find required library iconv.])
|
||||||
else
|
else
|
||||||
LIBS="$LIBS $LIBICONV"
|
LIBS="$LIBS $LIBICONV"
|
||||||
fi
|
fi
|
||||||
@ -118,10 +118,10 @@ AC_CHECK_HEADERS(zlib.h,
|
|||||||
### check for file magic support (currently optional)
|
### check for file magic support (currently optional)
|
||||||
AC_CHECK_HEADERS(magic.h,
|
AC_CHECK_HEADERS(magic.h,
|
||||||
[AC_CHECK_LIB(magic, magic_open, [LIBS="$LIBS -lmagic"],
|
[AC_CHECK_LIB(magic, magic_open, [LIBS="$LIBS -lmagic"],
|
||||||
LYX_WARNING([Cannot find limagic. Please check that the libmagic library
|
LYX_WARNING([cannot find libmagic. Please check that the libmagic library
|
||||||
is correctly installed on your system.
|
is correctly installed on your system.
|
||||||
Falling back to builtin file format detection.]))],
|
Falling back to builtin file format detection.]))],
|
||||||
[LYX_WARNING([Cannot find magic.h. Please check that the libmagic library
|
[LYX_WARNING([cannot find magic.h. Please check that the libmagic library
|
||||||
is correctly installed on your system.
|
is correctly installed on your system.
|
||||||
Falling back to builtin file format detection.])])
|
Falling back to builtin file format detection.])])
|
||||||
|
|
||||||
@ -142,20 +142,20 @@ for frontend in $FRONTENDS ; do
|
|||||||
Qt 4 version:\t\t${QT4_VERSION}\n"
|
Qt 4 version:\t\t${QT4_VERSION}\n"
|
||||||
dnl qt 4 build will fail without moc, uic, or bc
|
dnl qt 4 build will fail without moc, uic, or bc
|
||||||
if test -z "$MOC4"; then
|
if test -z "$MOC4"; then
|
||||||
LYX_ERROR([moc 4 binary not found !])
|
AC_MSG_ERROR([cannot find moc binary.])
|
||||||
fi
|
fi
|
||||||
if test -z "$UIC4"; then
|
if test -z "$UIC4"; then
|
||||||
LYX_ERROR([uic 4 binary not found !])
|
AC_MSG_ERROR([cannot find uic binary.!])
|
||||||
fi
|
fi
|
||||||
if test -z "$QT4_LIB"; then
|
if test -z "$QT4_LIB"; then
|
||||||
LYX_ERROR([qt 4 library not found !])
|
AC_MSG_ERROR([cannot find qt4 library.])
|
||||||
fi
|
fi
|
||||||
if test "$bc_found" = "no"; then
|
if test "$bc_found" = "no"; then
|
||||||
LYX_ERROR([bc binary not found !])
|
AC_MSG_ERROR([cannot find bc program.])
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
LYX_ERROR(Unknown frontend '$frontend');;
|
AC_MSG_ERROR([unknown frontend '$frontend'.]);;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -163,7 +163,7 @@ done
|
|||||||
test "x$prefix" = xNONE && prefix=$default_prefix
|
test "x$prefix" = xNONE && prefix=$default_prefix
|
||||||
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
||||||
if echo $prefix |grep ' ' >/dev/null 2>/dev/null ; then
|
if echo $prefix |grep ' ' >/dev/null 2>/dev/null ; then
|
||||||
LYX_WARNING([The installation prefix \"${prefix}\" contains a space, which
|
LYX_WARNING([the installation prefix \"${prefix}\" contains a space, which
|
||||||
causes problems with the Makefiles. The installation will be done in
|
causes problems with the Makefiles. The installation will be done in
|
||||||
directory \"`pwd`/installprefix\" instead. Please move its contents to
|
directory \"`pwd`/installprefix\" instead. Please move its contents to
|
||||||
the right place after installation.])
|
the right place after installation.])
|
||||||
@ -395,5 +395,11 @@ echo
|
|||||||
printf "$VERSION_INFO"
|
printf "$VERSION_INFO"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# Display a final warning if there has been a LYX_ERROR
|
# Display a final warning if there has been a LYX_WARNING
|
||||||
LYX_CHECK_ERRORS
|
LYX_CHECK_WARNINGS
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
Configuration of LyX was successful.
|
||||||
|
Type 'make' to compile the program,
|
||||||
|
and then 'make install' to install it.
|
||||||
|
EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user