dnl Process this file with autoconf to produce a configure -*- sh -*- script.

dnl ---------------------------------------------------------------------------
dnl Initialize automake now
dnl ---------------------------------------------------------------------------

AC_INIT()

dnl AC_PREREQ(2.50)


AC_CANONICAL_HOST

XFCE_PACKAGE=xfce

LIB_MAJOR=1
LIB_MINOR=38
LIB_TINY=14

LIBVERSION=${LIB_MAJOR}:${LIB_MINOR}:${LIB_TINY}

XFCE_VERSION=3.8.16
AC_MSG_CHECKING(versioncode $XFCE_VERSION in xfce.spec)
xfce_version=`grep version xfce.spec | grep define | sed -e 's,^[[^0-9.]]*,,g'`
case `echo $xfce_version | sed -e "s,$XFCE_VERSION,DEVELOPMENTVERSION,"` in
  DEVELOPMENTVERSION.*) 
     AC_MSG_RESULT(override: $xfce_version) 
     XFCE_VERSION=$xfce_version 
  ;;
  DEVELOPMENTVERSION)
     AC_MSG_RESULT(identical)
  ;;
  *) AC_MSG_RESULT(disagree)
     AC_MSG_WARN([xfce.spec version code has been changed to $xfce_version ])
     AC_MSG_WARN([configure.in has a incompatible version of $XFCE_VERSION ])
  ;;
esac

AC_SUBST(VERSION, $XFCE_VERSION)
AC_SUBST(LIBVERSION)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE($XFCE_PACKAGE, $XFCE_VERSION)
AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
dnl AC_SYS_LARGEFILE is missing in Autoconf-2.13
ifelse(AC_ACVERSION, [2.13], [],
[
   AC_SYS_LARGEFILE
])

# Taken from Jamie Zawinski's configure script for xscreensaver :
#
# By default, autoconf sets INSTALL_SCRIPT to '${INSTALL_PROGRAM}'.
# That's wrong: it should be set to '${INSTALL}', so that one can
# implement the "install-strip" target properly (strip executables,
# but do not try to strip scripts.)
#
INSTALL_SCRIPT='${INSTALL}'

ALL_LINGUAS="bg ca cs da de en_GB es et fi fr gl hu it ja ms nl pl pt_BR ro ru sk sr sv uk zh zh_CN zh_TW.Big5"
AM_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)

AC_CHECK_HEADERS(ctype.h)
AC_CHECK_HEADERS(unistd.h string.h getopt.h)
AC_CHECK_HEADERS(fcntl.h)
AC_CHECK_HEADERS(sys/soundcard.h linux/soundcard.h machine/soundcard.h)
AC_HEADER_STAT
AC_HEADER_DIRENT
AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME
AC_PATH_X
AC_PATH_XTRA

dnl Include X libs in checks
if test -n "$x_includes"; then
CPPFLAGS="${CPPFLAGS} -I$x_includes"
fi
if test -n "$x_libraries"; then
LDFLAGS="${LDFLAGS} -L$x_libraries"
fi

AC_TYPE_SIGNAL

AC_CHECK_FUNCS(wait3 wait4 waitpid)
AC_CHECK_FUNCS(snprintf vsnprintf strcasecmp strncasecmp)
AC_CHECK_FUNCS(sendmsg memcpy memmove memset)
AC_CHECK_FUNCS(sigaction siginterrupt)
AC_CHECK_FUNC(scandir, AC_DEFINE(HAVE_SCANDIR),)

dnl Deprecated :
dnl ICONV_LIBS=""
dnl AC_CHECK_FUNC(iconv, 
dnl       AC_CHECK_DECL(_libiconv_version,
dnl       [ AC_MSG_RESULT(assuming iconv.h belongs to GNU libiconv)
dnl         AC_CHECK_LIB(iconv, iconv, ICONV_LIBS="-liconv"; AC_DEFINE(HAVE_ICONV),)],
dnl       [ AC_MSG_RESULT(assuming iconv.h belongs to the C library)
dnl         AC_CHECK_FUNCS(iconv iconv_open iconv_close ,AC_DEFINE(HAVE_ICONV),)]),)
dnl AC_SUBST(ICONV_LIBS)

AM_PATH_GLIB(1.2.6, ,
            AC_MSG_ERROR(Cannot find GLIB: Is glib-config in path?))

AM_PATH_GTK(1.2.6, ,
            AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?))

dnl test for Xpm library
_cppflags="${CPPFLAGS}"
_ldflags="${LDFLAGS}"

AC_ARG_WITH(xpm,
[  --with-xpm=PFX          path to Xpm library],[
  if test "$withval" != "no"; then
    CPPFLAGS="${CPPFLAGS} -I$withval/include"
    LDFLAGS="${LDFLAGS} -L$withval/lib"
  fi
])

AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage, , 
             AC_MSG_ERROR(libXpm not found), $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS)

AC_CHECK_HEADER(X11/xpm.h, ,
                AC_MSG_ERROR(X11/xpm.h not found))
 
AC_ARG_ENABLE(xinerama,
[  --enable-xinerama       enable xinerama extension [default]
  --disable-xinerama      Don't use xinerama extension even if available], [],
 [enable_xinerama=yes])

XINERAMA_LIBS=""
if test "x$enable_xinerama" = "xyes"; then
        AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
	        [XINERAMA_LIBS="-lXinerama"
	         AC_CHECK_HEADERS(X11/extensions/Xinerama.h)],
	         [],[$X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS])
fi
AC_SUBST(XINERAMA_LIBS)

AC_ARG_ENABLE(xft,
[  --enable-xft            enable xft extension 
  --disable-xft           Don't use xft extension even if available [default] ], [],
 [enable_xft=no])

XFT_LIBS=""
if test "x$enable_xft" = "xyes"; then
        AC_CHECK_LIB(Xft, XftDefaultHasRender,
	        [XFT_LIBS="-lXft"
	         AC_CHECK_HEADERS(X11/Xft/Xft.h)],
	         [],[$X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS])
fi
AC_SUBST(XFT_LIBS)

AC_ARG_ENABLE(gtk_engine,
[  --enable-gtk-engine=PFX path to GTK engine libraries],[
  GTK_ENGINE_DIR=$enableval
],[
  GTK_ENGINE_DIR=`$GTK_CONFIG --prefix`/lib/gtk/themes/engines
])
AC_SUBST(GTK_ENGINE_DIR)

dnl Check the availability of Session Management
AC_CHECK_LIB(SM, SmcOpenConnection,
	[ AC_CHECK_HEADER(X11/SM/SMlib.h,[ AC_DEFINE(HAVE_SESSION)])],
	 [],[$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])

DEFAULT_IMAGE_TYPE=xpm
dnl test for gdk-pixbuf library
AC_ARG_ENABLE(gdk-pixbuf,
[  --enable-gdk-pixbuf=PFX prefix where gdk-pixbuf is installed],
  [
    if test "$enableval" != "no"; then
      if test -x "$enableval/bin/gdk-pixbuf-config"; then
        GDK_PIXBUF_CONFIG=$enableval/bin/gdk-pixbuf-config
      else
        GDK_PIXBUF_CONFIG=gdk-pixbuf-config
      fi

      GFX_LIB_GDK_PIXBUF=`$GDK_PIXBUF_CONFIG --libs`
      GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG --cflags`

      AC_CHECK_LIB(gdk_pixbuf, gdk_pixbuf_new,
        GDK_PIXBUF_LIBS=$GFX_LIB_GDK_PIXBUF;DEFAULT_IMAGE_TYPE=jpg;AC_DEFINE(HAVE_GDK_PIXBUF), ,
        $GFX_LIB_GDK_PIXBUF)
    fi
  ],
  [
    GDK_PIXBUF_CONFIG=gdk-pixbuf-config

    GFX_LIB_GDK_PIXBUF=`$GDK_PIXBUF_CONFIG --libs`
    GDK_PIXBUF_CFLAGS=`$GDK_PIXBUF_CONFIG --cflags`

    AC_CHECK_LIB(gdk_pixbuf, gdk_pixbuf_new,
        GDK_PIXBUF_LIBS=$GFX_LIB_GDK_PIXBUF;DEFAULT_IMAGE_TYPE=jpg;AC_DEFINE(HAVE_GDK_PIXBUF), ,
        $GFX_LIB_GDK_PIXBUF)
  ]
)

AC_SUBST(HAVE_GDK_PIXBUF)
AC_SUBST(GDK_PIXBUF_LIBS)
AC_SUBST(GDK_PIXBUF_CFLAGS)

if test "x$GDK_PIXBUF_LIBS" = "x"; then
  dnl test for imlib library
  AC_ARG_ENABLE(imlib,
  [  --enable-imlib=PFX      prefix where Imlib is installed (optional, only selected if gdk-pixbuf is missing)],
    [
      if test "$enableval" != "no"; then
	if test -x "$enableval/bin/imlib-config"; then
          IMLIB_CONFIG=$enableval/bin/imlib-config
	else
          IMLIB_CONFIG=imlib-config
	fi

	GFX_LIB_IMLIB=`$IMLIB_CONFIG --libs`
	GFX_LIB_GDK_IMLIB=`$IMLIB_CONFIG --libs-gdk`
	IMLIB_CFLAGS=`$IMLIB_CONFIG --cflags`
	GDK_IMLIB_CFLAGS=`$IMLIB_CONFIG --cflags-gdk`

	AC_CHECK_LIB(Imlib, Imlib_init,
          IMLIB_LIBS=$GFX_LIB_IMLIB; AC_DEFINE(HAVE_IMLIB), ,
          $GFX_LIB_IMLIB)
	AC_CHECK_LIB(gdk_imlib, gdk_imlib_init,
          GDK_IMLIB_LIBS=$GFX_LIB_GDK_IMLIB;DEFAULT_IMAGE_TYPE=jpg;AC_DEFINE(HAVE_GDK_IMLIB), ,
          $GFX_LIB_GDK_IMLIB)
      fi
    ],
    [
      IMLIB_CONFIG=imlib-config

      GFX_LIB_IMLIB=`$IMLIB_CONFIG --libs`
      GFX_LIB_GDK_IMLIB=`$IMLIB_CONFIG --libs-gdk`
      IMLIB_CFLAGS=`$IMLIB_CONFIG --cflags`
      GDK_IMLIB_CFLAGS=`$IMLIB_CONFIG --cflags-gdk`

      AC_CHECK_LIB(Imlib, Imlib_init,
	IMLIB_LIBS=$GFX_LIB_IMLIB; AC_DEFINE(HAVE_IMLIB), ,
	$GFX_LIB_IMLIB)
      AC_CHECK_LIB(gdk_imlib, gdk_imlib_init,
	GDK_IMLIB_LIBS=$GFX_LIB_GDK_IMLIB;DEFAULT_IMAGE_TYPE=jpg;AC_DEFINE(HAVE_GDK_IMLIB), ,
	$GFX_LIB_GDK_IMLIB)
    ]
  )
fi

AC_SUBST(HAVE_IMLIB)
AC_SUBST(HAVE_GDK_IMLIB)
AC_SUBST(IMLIB_LIBS)
AC_SUBST(GDK_IMLIB_LIBS)
AC_SUBST(IMLIB_CFLAGS)
AC_SUBST(GDK_IMLIB_CFLAGS)

dnl
dnl Check for audiofile library
dnl
AC_ARG_ENABLE(audiofile,
[  --enable-audiofile=PFX  prefix where audiofile is installed (optionnal)],
  [
    if test "$enableval" != "no"; then
      if test -x "$enableval/bin/audiofile-config"; then
        AUDIOFILE_CONFIG=$enableval/bin/audiofile-config
      else
        AUDIOFILE_CONFIG=audiofile-config
      fi

      AUDIOFILE_LIBS=`$AUDIOFILE_CONFIG --libs`
      AUDIOFILE_CFLAGS=`$AUDIOFILE_CONFIG --cflags`

      AC_CHECK_LIB(audiofile, afOpenFile, AC_DEFINE(HAVE_AUDIOFILE), , 
      [$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
    fi
  ],
  [
    AUDIOFILE_CONFIG=audiofile-config

    AUDIOFILE_LIBS=`$AUDIOFILE_CONFIG --libs`
    AUDIOFILE_CFLAGS=`$AUDIOFILE_CONFIG --cflags`

    AC_CHECK_LIB(audiofile, afOpenFile, AC_DEFINE(HAVE_AUDIOFILE), , 
    [$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
  ]
)

AC_SUBST(HAVE_AUDIOFILE)
AC_SUBST(AUDIOFILE_LIBS)
AC_SUBST(AUDIOFILE_CFLAGS)

dnl
dnl Check for aRts library
dnl
AC_ARG_ENABLE(arts,
[  --enable-arts=PFX  prefix where arts is installed (optionnal)],
  [
    if test "$enableval" != "no"; then
      if test -x "$enableval/bin/artsc-config"; then
        ARTS_CONFIG=$enableval/bin/artsc-config
      else
        ARTS_CONFIG=artsc-config
      fi

      ARTS_LIBS=`$ARTS_CONFIG --libs`
      ARTS_CFLAGS=`$ARTS_CONFIG --cflags`

      AC_CHECK_LIB(artsc, arts_init, AC_DEFINE(HAVE_ARTS), , 
      [$LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS])
    fi
  ],
)

AC_SUBST(HAVE_ARTS)
AC_SUBST(ARTS_LIBS)
AC_SUBST(ARTS_CFLAGS)

dnl
dnl Check for libxml2 library
dnl
AC_ARG_ENABLE(libxml2,
[  --enable-libxml2=PFX  prefix where libxml2 is installed (optional)],
  [
    if test "$enableval" != "no"; then
      if test -x "$enableval/bin/xml2-config"; then
        LIBXML2_CONFIG=$enableval/bin/xml2-config
      else
        LIBXML2_CONFIG=xml2-config
      fi

      LIBXML2_LIBS=`$LIBXML2_CONFIG --libs`
      LIBXML2_CFLAGS=`$LIBXML2_CONFIG --cflags`

      save_LIBS=$LIBS ; LIBS=""
      AC_CHECK_LIB(xml2, xmlParseDoc, AC_DEFINE(HAVE_LIBXML2), ,
      [$LIBXML2_LIBS])
      LIBS=$save_LIBS
    fi
  ],
dnl ---------------------------------------------------------------------------
dnl  I guess nothing at all here is better than a small piece of script.
dnl ---------------------------------------------------------------------------
dnl  [
dnl    LIBXML2_CONFIG=xml2-config
dnl 
dnl   case "$VERSION" in
dnl   3.*)
dnl    AC_MSG_RESULT(checking for libxml2 is not enabled... skipped)
dnl    ;;
dnl   *)
dnl 	  LIBXML2_LIBS=`$LIBXML2_CONFIG --libs`
dnl 	  LIBXML2_CFLAGS=`$LIBXML2_CONFIG --cflags`
dnl 
dnl       save_LIBS=$LIBS ; LIBS=""
dnl       AC_CHECK_LIB(xml2, xmlParseDoc, AC_DEFINE(HAVE_LIBXML2), ,[$LIBXML2_LIBS])
dnl       LIBS=$save_LIBS
dnl       ;;
dnl   esac
dnl   ]
)

AC_SUBST(HAVE_LIBXML2)
AC_SUBST(LIBXML2_LIBS)
AC_SUBST(LIBXML2_CFLAGS)

dnl enable CDE-specific startup files?
AC_MSG_CHECKING(whether to install CDE specific files)
AC_ARG_ENABLE(dt,
        [  --enable-dt             enable CDE specific files],
        [USE_DT=$enableval],
        [USE_DT=no]
)
AC_MSG_RESULT($USE_DT)
AC_SUBST(USE_DT)

AC_ARG_WITH(dt-suffix,
[  --with-dt-suffix=STR    string to append to CDE filenames],[
  AC_MSG_CHECKING(for string to append to CDE filenames)
  DT_SUFFIX="$withval"
  AC_MSG_RESULT($DT_SUFFIX)
])
AC_SUBST(DT_SUFFIX)

dnl enable GDM-specific startup files?
AC_MSG_CHECKING(whether to install GDM specific files)
AC_ARG_ENABLE(gdm,
	[  --enable-gdm            enable GDM specific files],
	[USE_GDM=$enableval],
	[USE_GDM=no]
)
AC_MSG_RESULT($USE_GDM)
AC_SUBST(USE_GDM)

GDM_PREFIX=/etc/X11/gdm/Sessions
AC_MSG_CHECKING(where GDM keeps session files)
AC_ARG_WITH(gdm-prefix,
	[  --with-gdm-prefix=STR        where GDM keeps session files (default=/etc/X11/gdm/Sessions)],
	[ GDM_PREFIX="$withval", GDM_PREFIX=/etc/X11/gdm/Sessions]
)
AC_MSG_RESULT($GDM_PREFIX)
AC_SUBST(GDM_PREFIX)

compiler_warnings=yes
AC_MSG_CHECKING(if we want compiler warnings)
AC_ARG_ENABLE(
	warnings,
	[  --enable-warnings       [default=yes] enable gcc compiler warnings],
	compiler_warnings="$enableval", compiler_warnings="yes"
	)
AC_MSG_RESULT($compiler_warnings)
if test "$CC" = "gcc" -o "$CC" = "g++"; then
  echo "GCC compiler found"
  if test "$compiler_warnings" = "yes"; then
    if echo "$CFLAGS" | grep "\-Wall" > /dev/null 2> /dev/null; then
      CFLAGS="$CFLAGS"
    else
      echo "updating CFLAGS with extra '-Wall' option"
      CFLAGS="$CFLAGS -Wall"
    fi

dnl ---------------------------------------------------------------------------
dnl depending on the version of gcc used, using '-Wno-implicit-int' oppresses
dnl the ridiculous messages printed because of the X11 prototypes from the
dnl X11 headers.  the downside to doing this, of course, is that code in
dnl the application itself which have implicit int declarations will go
dnl unnoticed.  but oh well; whomever writes the code should be sure not to
dnl use any implicit declarations.
dnl ---------------------------------------------------------------------------
    
    if echo "$CFLAGS" | grep "\-Wno-implicit-int" > /dev/null 2> /dev/null; then
      CFLAGS="$CFLAGS"
    else
      echo "updating CFLAGS with extra '-Wno-implicit-int' option"
      CFLAGS="$CFLAGS -Wno-implicit-int"
    fi
  fi
fi

dnl echo "dbg:target $target"
case "$target" in
"")
;;
"no")
;;
"NONE")
;;
*)
   CFLAGS="$CFLAGS -march=$target"
   ;;
esac

dnl AC_ARG_ENABLE(xfce_theme,
dnl 	[  --enable-xfce-theme        [default=yes] build xfce_theme],
dnl         [ XFCE_THEME=$enableval,
dnl )
dnl AC_SUBST(XFCE_THEME)

AC_ARG_ENABLE(dmalloc,
	[  --enable-dmalloc=PFX    [default=no] enable dmalloc library],
        [ DMALLOC_LIB=$enableval/libdmalloc.a
          AC_DEFINE(DMALLOC)],
)
AC_SUBST(DMALLOC_LIB)

AC_ARG_ENABLE(old_style,
[  --enable-old-style      Enable old style for xfce panel [default=no]],[
  AC_DEFINE(OLD_STYLE)
],)

AC_ARG_ENABLE(manage-overrides,
[  --enable-manage-overrides Enable management of overrides windows in XFwm [default=no]],[
  AC_DEFINE(MANAGE_OVERRIDES)
],)

AC_ARG_ENABLE(debug,
[  --enable-debug          Enable extra debugging [default=no]],[
  AC_DEFINE(DEBUG)
],)

AC_DEFINE(REQUIRES_STASHEVENT)

AC_MSG_CHECKING(if prototype for gethostname exists)
AC_EGREP_CPP(gethostname,[
#include <unistd.h>],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETHOSTNAME_PROTO),
AC_MSG_RESULT(no))

dnl The following is to ensure $prefix is properly expanded
AC_MSG_CHECKING(XFce directory structure)
AC_ARG_WITH(data-dir,
[  --with-data-dir=DIR     Set XFce data directory to DIR],[
  XFCE_DIR=$withval],[
if test "x$datadir" = "x\${prefix}/share" -o "x$prefix" = "xNONE";
then
  XFCE_DIR="/usr/local/share/xfce"
else
  XFCE_DIR="$datadir/xfce"
fi])
AC_SUBST(XFCE_DIR)

AC_ARG_WITH(conf-dir,
[  --with-conf-dir=DIR     Set XFce configuration directory to DIR],[
  XFCE_CONFDIR=$withval],[
XFCE_CONFDIR=`echo $XFCE_CONFDIR | sed "s,\${prefix},${prefix},"`
if test "x$sysconfdir" = "x\${prefix}/etc" -o "x$prefix" = "xNONE";
then
  XFCE_CONFDIR="/usr/local/etc/xfce"
else
  XFCE_CONFDIR="$sysconfdir/xfce"
fi])
AC_SUBST(XFCE_CONFDIR)

AC_ARG_WITH(locale-dir,
[  --with-locale-dir=DIR   Set XFce locale directory to DIR],[
  XFCE_LOCALE_DIR=$withval],[
if test "x$prefix" = "x" -o "x$prefix" = "xNONE"; then
  XFCE_LOCALE_DIR="/usr/local/share/locale"
else
  XFCE_LOCALE_DIR="$prefix/share/locale"
fi])
AC_SUBST(XFCE_LOCALE_DIR)

AC_MSG_RESULT(ok)
AC_MSG_RESULT(XFCE_DIR set to $XFCE_DIR)
AC_MSG_RESULT(XFCE_LOCALE_DIR set to $XFCE_LOCALE_DIR)
AC_MSG_RESULT(XFCE_CONFDIR set to $XFCE_CONFDIR)

AC_OUTPUT(Makefile \
libs/Makefile \
xfce/Makefile \
xfwm/Makefile \
xftree/Makefile \
xftree/icons/Makefile \
xfpager/Makefile \
xfmouse/Makefile \
xfrun/Makefile \
xfbd/Makefile \
xfclock/Makefile \
xfsound/Makefile \
xfgnome/Makefile \
xfmenu/Makefile \
xfdiff/Makefile \
xfdiff/icons/Makefile \
xfglob/Makefile \
xfglob/icons/Makefile \
xfsamba/Makefile \
xfsamba/icons/Makefile \
xfskin/Makefile \
xfumed/Makefile \
xfumed/icons/Makefile \
scripts/Makefile \
intl/Makefile \
dt/Makefile \
gdm/Makefile \
xfce_theme/Makefile \
cursors/Makefile \
other/Makefile \
backdrops/Makefile \
icons/Makefile \
palettes/Makefile \
sounds/Makefile \
docs/Makefile \
docs/images/Makefile \
docs/sgml/Makefile \
docs/html/Makefile \
docs/html/stylesheet-images/Makefile \
textures/Makefile \
fonts/Makefile \
po/Makefile.in po/Makefile)

sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" scripts/xfce_setup.in         > scripts/xfce_setup
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" scripts/xfce_upgrade.in       > scripts/xfce_upgrade
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" scripts/xfhelp.in             > scripts/xfhelp
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" scripts/startxfce.in          > scripts/startxfce
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfsoundrc.in            > other/xfsoundrc
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.in              > other/xfce3rc
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.bg.in 	  > other/xfce3rc.bg
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.cs.in 	  > other/xfce3rc.cs
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.de.in 	  > other/xfce3rc.de
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.fr.in 	  > other/xfce3rc.fr
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.hu.in 	  > other/xfce3rc.hu
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.ja.in 	  > other/xfce3rc.ja
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.ko.in 	  > other/xfce3rc.ko
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.nl.in 	  > other/xfce3rc.nl
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.sr.in 	  > other/xfce3rc.sr
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.uk.in 	  > other/xfce3rc.uk
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.zh_CN.GB2312.in > other/xfce3rc.zh_CN.GB2312
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfce3rc.zh_TW.Big5.in   > other/xfce3rc.zh_TW.Big5
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xfwmrc.in               > other/xfwmrc
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xinitrc.in              > other/xinitrc
sed -e "s%XFCE_DIR%$XFCE_DIR%g" -e "s%XFCE_CONFDIR%$XFCE_CONFDIR%g" other/xinitrc.mwm.in          > other/xinitrc.mwm
sed -e "s%XFCE_DIR%$XFCE_DIR%g" xfskin/xfskin.in >  xfskin/xfskin
sed -e "s%XFCE_DIR%$XFCE_DIR%g" other/xfbdrc.in > other/xfbdrc
sed -e "s%XFCE_VERSION%$VERSION%g" -e "s%DATE%`date`%g" -e "s%HOSTNAME%`hostname`%g" other/COPYING.in > other/COPYING
sed -e "s%XFCE_DIR%$XFCE_DIR%g" backdrops/Blue.list.in >  backdrops/Blue.list
sed -e "s%XFCE_DIR%$XFCE_DIR%g" backdrops/Toulouse.list.in >  backdrops/Toulouse.list
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
