See bug #7568 for details.
[AC_MSG_CHECKING([what packaging should be used])
AC_ARG_WITH(packaging,
[AC_HELP_STRING([--with-packaging=THIS], [use THIS packaging for installation:
[AC_MSG_CHECKING([what packaging should be used])
AC_ARG_WITH(packaging,
[AC_HELP_STRING([--with-packaging=THIS], [use THIS packaging for installation:
- Possible values: posix, windows, macosx])],
+ Possible values: posix, windows, macosx, haiku])],
[lyx_use_packaging="$withval"], [
case $host in
*-apple-darwin*) lyx_use_packaging=macosx ;;
[lyx_use_packaging="$withval"], [
case $host in
*-apple-darwin*) lyx_use_packaging=macosx ;;
- *-pc-mingw32*) lyx_use_packaging=windows;;
- *) lyx_use_packaging=posix;;
+ *-pc-mingw32*) lyx_use_packaging=windows ;;
+ *haiku*) lyx_use_packaging=haiku ;;
+ *) lyx_use_packaging=posix ;;
esac])
AC_MSG_RESULT($lyx_use_packaging)
lyx_install_posix=false
esac])
AC_MSG_RESULT($lyx_use_packaging)
lyx_install_posix=false
pkgdatadir='${datadir}/${PACKAGE}'
default_prefix=$ac_default_prefix
case ${host} in
pkgdatadir='${datadir}/${PACKAGE}'
default_prefix=$ac_default_prefix
case ${host} in
- *cygwin*) lyx_install_cygwin=true ;;
- *apple-darwin*) lyx_install_macosx=true ;;
+ *cygwin*) lyx_install_cygwin=true ;;
+ *apple-darwin*) lyx_install_macosx=true ;;
esac
lyx_install_posix=true ;;
esac
lyx_install_posix=true ;;
+ haiku) AC_DEFINE(USE_HAIKU_PACKAGING, 1, [Define to 1 if LyX should use a Haiku-style file layout])
+ PACKAGE=lyx${version_suffix}
+ program_suffix=$version_suffix
+ pkgdatadir='${datadir}/${PACKAGE}'
+ default_prefix=$ac_default_prefix
+ lyx_install_posix=true ;;
*) AC_MSG_ERROR([unknown packaging type $lyx_use_packaging.]) ;;
esac
AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
*) AC_MSG_ERROR([unknown packaging type $lyx_use_packaging.]) ;;
esac
AM_CONDITIONAL(INSTALL_MACOSX, $lyx_install_macosx)
return false;
// Set the PATH correctly.
return false;
// Set the PATH correctly.
-#if !defined (USE_POSIX_PACKAGING)
+#if !defined (USE_POSIX_PACKAGING) && !defined (USE_HAIKU_PACKAGING)
// Add the directory containing the LyX executable to the path
// so that LyX can find things like tex2lyx.
if (package().build_support().empty())
// Add the directory containing the LyX executable to the path
// so that LyX can find things like tex2lyx.
if (package().build_support().empty())
#if !defined (USE_WINDOWS_PACKAGING) && \
!defined (USE_MACOSX_PACKAGING) && \
#if !defined (USE_WINDOWS_PACKAGING) && \
!defined (USE_MACOSX_PACKAGING) && \
+ !defined (USE_HAIKU_PACKAGING) && \
!defined (USE_POSIX_PACKAGING)
!defined (USE_POSIX_PACKAGING)
-#error USE_FOO_PACKAGING must be defined for FOO = WINDOWS, MACOSX or POSIX.
+#error USE_FOO_PACKAGING must be defined for FOO = WINDOWS, MACOSX, HAIKU or POSIX.
#endif
#if defined (USE_MACOSX_PACKAGING)
#endif
#if defined (USE_MACOSX_PACKAGING)
(void)home_dir; // Silence warning about unused variable.
return FileName(addPath(fromqstr(QDesktopServices::storageLocation(QDesktopServices::DataLocation)), PACKAGE));
(void)home_dir; // Silence warning about unused variable.
return FileName(addPath(fromqstr(QDesktopServices::storageLocation(QDesktopServices::DataLocation)), PACKAGE));
+#elif defined (USE_HAIKU_PACKAGING)
+ return FileName(addPath(home_dir.absFileName(), string("/config/settings/") + PACKAGE));
+
#else // USE_POSIX_PACKAGING
return FileName(addPath(home_dir.absFileName(), string(".") + PACKAGE));
#endif
#else // USE_POSIX_PACKAGING
return FileName(addPath(home_dir.absFileName(), string(".") + PACKAGE));
#endif