XCOMM  Imakefile for XSession
XCOMM  Copyright (C) 1993, 1994  Alain Nissen & Raphael Quinet,
XCOMM                                             University of Liege, Belgium.
XCOMM 
XCOMM  XSession is free software; you can redistribute it and/or modify it
XCOMM  under the terms of the GNU General Public License as published by the
XCOMM  Free Software Foundation; either version 2, or (at your option) any
XCOMM  later version.
XCOMM 
XCOMM  XSession is distributed in the hope that it will be useful, but WITHOUT
XCOMM  ANY WARRANTY, either from the authors or from the University of Liege;
XCOMM  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
XCOMM  PARTICULAR PURPOSE.  See the GNU General Public License for more
XCOMM  details.
XCOMM 
XCOMM  You should have received a copy of the GNU General Public License along
XCOMM  with xsession; see the file COPYING.  If not, write to the Free Software
XCOMM  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
XCOMM 
XCOMM  Authors:
XCOMM     Raphael Quinet <quinet@montefiore.ulg.ac.be>
XCOMM                    <quinet@server.montefiore.ulg.ac.be>
XCOMM     Alain Nissen   <nissen@montefiore.ulg.ac.be>
XCOMM                    <nissen@server.montefiore.ulg.ac.be>

XCOMM o Define USEM4 if you want to use "m4" as a preprocessor for the
XCOMM   window managers' configuration files.
XCOMM o Define USECPP if you want to use "/lib/cpp" as a preprocessor for the
XCOMM   window managers' configuration files.
XCOMM o Don't use both USEM4 and USECPP.  These options are mutually exclusive.
#define USE_M4
/* #define USE_CPP */

XCOMM o Define SOUNDS if you want to have a noisy xsession.  You will need
XCOMM   Mark Boyns' rplay library, available from sounds.sdsu.edu and
XCOMM   bear.montefiore.ulg.ac.be in the directory /pub/rplay.
#define USE_SOUNDS

XCOMM o Define OLD_WAITPID if your waitpid(2) system call uses a pointer to a
XCOMM   "union wait" variable (instead of "int") to put the return code of a
XCOMM   terminated child process.
/* #define OLD_WAITPID */

XCOMM o Define NO_VFORK if your system doesn't support vfork(2) in its
XCOMM   standard C library (on System V operating systems, for example).
/* #define NO_VFORK */

XCOMM Uncomment and adjust these to change the destinations of "make install"
XCOMM and "make install.man" if the defaults are not satisfactory.
XCOMM BINDIR		= /usr/local/bin
XCOMM MANDIR		= /usr/local/man/man1
XCOMM MANSUFFIX		= 1

XCOMM It's not a good idea to change the default "app-default" directory.
XCOMM Chances are that "XSession" and "XSession-color" will simply be
XCOMM ignored if you uncomment and change the following line.  But you may
XCOMM change it if you can't install the files in their default directory.
XCOMM If you do this, you will have to set the XAPPLRESDIR environment
XCOMM variable to the appropriate directory before executing xsession.
XCOMM XAPPLOADDIR     = /usr/lib/X11/app-defaults

XCOMM How excited are you about debugging?  This can be -g, -O, or nothing.
CDEBUGFLAGS	= -O

XCOMM -------------------------------------------------------------------------
XCOMM Please don't change anything below this point - no need really - We hope.
XCOMM

           SRCS	= widgets.c console.c exec.c xsession.c

           OBJS	= widgets.o console.o exec.o xsession.o

#ifdef USE_M4
# define M4DEF -DUSEM4
# define CPPDEF
#else
# define M4DEF
# ifdef USE_CPP
#  define CPPDEF -DUSECPP
# else
#  define CPPDEF
# endif
#endif

#ifdef USE_SOUNDS
# define SOUNDDEF -DSOUNDS
# define SOUNDLIB -lrplay
#else
# define SOUNDDEF
# define SOUNDLIB
#endif

#ifdef OLD_WAITPID
# define WAITPIDDEF -DOLD_WAITPID
#else
# define WAITPIDDEF
#endif

#ifdef NO_VFORK
# define FORKDEF -DNO_VFORK
#else
# define FORKDEF
#endif

        DEPLIBS	= XawClientDepLibs
LOCAL_LIBRARIES	= XawClientLibs SOUNDLIB
DEFINES		= M4DEF CPPDEF SOUNDDEF WAITPIDDEF FORKDEF


ComplexProgramTarget(xsession)
InstallAppDefaults(XSession)
InstallAppDefaults(XSession-color)

XCOMM You will only need the following lines if you change XSession.ad and
XCOMM you want to hard-code the changes into xsession.  This is not needed if
XCOMM XSession.ad is installed in the ".../lib/X11/app-defaults" directory,
XCOMM because the defaults in XSession.ad will override the fallback resources
XCOMM taken from XSession.ad.h.  See the X(1) manual page for details.
XSession.ad.h: XSession.ad
	/bin/sh ./utils/ad2c XSession.ad > XSession.ad.h

