AC_DEFINE(DEVEL_VERSION, 1, [Define if you are building a development version of LyX])
LYX_DATE="not released yet"
echo "WARNING: This is a development version. Expect bugs.";;
- *pre*|*alpha*|*beta*) lyx_prerelease=yes
+ *pre*|*alpha*|*beta*|*rc*) lyx_prerelease=yes
echo "WARNING: This is a prerelease. Be careful and backup your documents.";;
esac
AC_SUBST(lyx_devel_version)])
withval="-"AC_PACKAGE_VERSION
ac_configure_args=`echo $ac_configure_args | sed "s,--with-version-suffix,--with-version-suffix=$withval,"`
fi
- version_suffix=$withval
+ AC_SUBST(version_suffix,$withval)
RPM_VERSION_SUFFIX="--with-version-suffix=$withval"])
AC_SUBST(RPM_VERSION_SUFFIX)
AC_MSG_RESULT([$withval])
AC_MSG_RESULT($CXX)
AC_PROG_CXX
+AC_PROG_CXXCPP
### We might want to get or shut warnings.
AC_ARG_ENABLE(warnings,
fi;])
if test x$enable_warnings = xyes ; then
lyx_flags="warnings $lyx_flags"
- AC_DEFINE(WITH_WARNINGS, 1,
- [Define this if you want to see the warning directives put here and
- there by the developpers to get attention])
fi
### We might want to disable debug
dnl be used.
AC_DEFUN([LYX_USE_INCLUDED_BOOST],[
AC_ARG_WITH(included-boost,
- [ --with-included-boost use the boost lib supplied with LyX],
+ [ --without-included-boost do not use the boost lib supplied with LyX, try to find one in the system directories - compilation will abort if nothing suitable is found],
[lyx_cv_with_included_boost=$withval
AC_MSG_RESULT([$with_included_boost])],
[lyx_cv_with_included_boost=yes])
dnl Adds a --with-'dir-name' option (described by 'desc') and puts the
dnl resulting directory name in 'dir-var-name'.
AC_DEFUN([LYX_WITH_DIR],[
- AC_ARG_WITH($1,[ --with-$1 specify $2])
+ AC_ARG_WITH($1,[AC_HELP_STRING([--with-$1],[specify $2])])
AC_MSG_CHECKING([for $2])
if test -z "$with_$3"; then
AC_CACHE_VAL(lyx_cv_$3, lyx_cv_$3=$4)
datadir='${prefix}/Contents/Resources'
pkgdatadir='${datadir}'
mandir='${datadir}/man'
- lyx_install_macosx=false ;;
+ lyx_install_macosx=true ;;
windows) AC_DEFINE(USE_WINDOWS_PACKAGING, 1, [Define to 1 if LyX should use a Windows-style file layout])
PACKAGE=LyX${version_suffix}
default_prefix="C:/Program Files/${PACKAGE}"
break],
[AC_MSG_RESULT(no)])
done])
+
+dnl Extract the single digits from PACKAGE_VERSION and make them available.
+dnl Defines LYX_MAJOR_VERSION, LYX_MINOR_VERSION, LYX_RELEASE_LEVEL, and
+dnl LYX_RELEASE_PATCH, the latter being possibly equal to 0.
+AC_DEFUN([LYX_SET_VERSION_INFO],
+[lyx_major=`echo $PACKAGE_VERSION | sed -e 's/[[.]].*//'`
+ lyx_patch=`echo $PACKAGE_VERSION | sed -e "s/^$lyx_major//" -e 's/^.//'`
+ lyx_minor=`echo $lyx_patch | sed -e 's/[[.]].*//'`
+ lyx_patch=`echo $lyx_patch | sed -e "s/^$lyx_minor//" -e 's/^.//'`
+ lyx_release=`echo $lyx_patch | sed -e 's/[[^0-9]].*//'`
+ lyx_patch=`echo $lyx_patch | sed -e "s/^$lyx_release//" -e 's/^[[.]]//' -e 's/[[^0-9]].*//'`
+ test "x$lyx_patch" = "x" && lyx_patch=0
+ AC_SUBST(LYX_MAJOR_VERSION,$lyx_major)
+ AC_SUBST(LYX_MINOR_VERSION,$lyx_minor)
+ AC_SUBST(LYX_RELEASE_LEVEL,$lyx_release)
+ AC_SUBST(LYX_RELEASE_PATCH,$lyx_patch)
+])