1998-03-04 00:39:41 -06:00
|
|
|
AC_INIT(src/motif/main.c)
|
1997-11-29 20:39:58 -06:00
|
|
|
|
|
|
|
# *******************************************
|
|
|
|
# * figure out the configure options:
|
1998-04-21 22:25:34 -05:00
|
|
|
CFLAGS="${CFLAGS} -O2 -Wall"
|
|
|
|
|
1998-03-17 22:54:05 -06:00
|
|
|
# some plything option lists
|
1998-04-21 22:25:34 -05:00
|
|
|
# CFLAGS="-g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects"
|
|
|
|
# CFLAGS="-g -Wall -ansi -pedantic -Wwrite-strings -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Winline"
|
|
|
|
# CFLAGS="-g -Wall -ansi -pedantic"
|
|
|
|
|
1997-11-29 20:39:58 -06:00
|
|
|
AC_ARG_ENABLE( debug,
|
|
|
|
[ --enable-debug compile with debugging flags set],
|
1998-04-21 22:25:34 -05:00
|
|
|
CFLAGS="${CFLAGS} -g -Wall"
|
|
|
|
LDFLAGS="${LDFLAGS} -g -Wall"
|
1997-11-29 20:39:58 -06:00
|
|
|
AC_DEFINE(DEBUG_MEMORY,1) AC_DEFINE(USE_DEBUG,1),
|
|
|
|
AC_DEFINE(DEBUG_MEMORY,0) AC_DEFINE(USE_DEBUG,0) )
|
1998-03-18 00:08:12 -06:00
|
|
|
|
|
|
|
AC_ARG_ENABLE( warnings,
|
|
|
|
[ --enable-warnings compile with lots of warnings generated],
|
1998-04-21 22:25:34 -05:00
|
|
|
CFLAGS="${CFLAGS} -g -Wall -ansi -pedantic -Wwrite-strings -Wid-clash-31 -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Woverloaded-virtual -Winline -felide-constructors -fnonnull-objects"
|
|
|
|
LDFLAGS="${LDFLAGS} -g -Wall"
|
1998-03-18 00:08:12 -06:00
|
|
|
AC_DEFINE(DEBUG_MEMORY,1) AC_DEFINE(USE_DEBUG,1) )
|
|
|
|
|
|
|
|
|
1998-03-01 11:35:32 -06:00
|
|
|
# USE_QUICKFILL:
|
1997-11-29 20:39:58 -06:00
|
|
|
AC_DEFINE(USE_QUICKFILL,1)
|
|
|
|
|
1998-03-01 11:35:32 -06:00
|
|
|
# Should we uses color (red/black) balances?
|
|
|
|
AC_ARG_ENABLE( color,
|
|
|
|
[ --disable-color don't use color (red/black) balances],
|
|
|
|
AC_DEFINE(USE_NO_COLOR,1),
|
|
|
|
AC_DEFINE(USE_NO_COLOR,0) )
|
|
|
|
|
|
|
|
# Let the user specify motif paths:
|
|
|
|
AC_ARG_WITH( motif,
|
|
|
|
[ --with-motif=PATH specify where to look for motif includes and libs],
|
1998-04-21 22:25:34 -05:00
|
|
|
X_LIBS="${X_LIBS} -L$with_motif/lib" X_CFLAGS="$X_CFLAGS -I$with_motif/include" )
|
|
|
|
|
1998-03-04 00:39:41 -06:00
|
|
|
AC_ARG_WITH( motif-includes,
|
|
|
|
[ --with-motif-includes=DIR specify where to look for motif includes],
|
1998-04-21 22:25:34 -05:00
|
|
|
X_CFLAGS="${X_CFLAGS} -I$with_motif_includes" )
|
|
|
|
|
1998-03-04 00:39:41 -06:00
|
|
|
AC_ARG_WITH( motif-libraries,
|
|
|
|
[ --with-motif-libraries=DIR specify where to look for motif libs],
|
1998-04-21 22:25:34 -05:00
|
|
|
X_LIBS="${X_LIBS} -L$with_motif_libraries" )
|
1998-03-01 11:35:32 -06:00
|
|
|
|
1998-04-21 22:25:34 -05:00
|
|
|
# Let the user specify gnome paths:
|
|
|
|
# -I...libgnomesupport is to fix bug in gnome-1.3 release
|
|
|
|
AC_ARG_WITH( gnome,
|
|
|
|
[ --with-gnome=PATH specify where to look for gnome includes and libs],
|
|
|
|
X_LIBS="${X_LIBS} -L$with_gnome/lib" X_CFLAGS="$X_CFLAGS -I$with_gnome/include -I$with_gnome/include/libgnomesupport" )
|
1998-03-01 11:35:32 -06:00
|
|
|
|
1998-04-21 22:25:34 -05:00
|
|
|
AC_ARG_WITH( gnome-includes,
|
|
|
|
[ --with-gnome-includes=DIR specify where to look for gnome includes],
|
|
|
|
X_CFLAGS="${X_CFLAGS} -I$with_gnome_includes -I$with_gnome_includes/libgnomesupport" )
|
1997-11-29 20:39:58 -06:00
|
|
|
|
1998-04-21 22:25:34 -05:00
|
|
|
AC_ARG_WITH( gnome-libraries,
|
|
|
|
[ --with-gnome-libraries=DIR specify where to look for gnome libs],
|
|
|
|
X_LIBS="${X_LIBS} -L$with_gnome_libraries" )
|
|
|
|
|
|
|
|
AC_ARG_WITH(package, help-string [, action-if-given [, action-if-not-given]])
|
1997-11-29 20:39:58 -06:00
|
|
|
|
|
|
|
# *******************************************
|
|
|
|
# check for various programs, and stuff:
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
AC_PROG_CC
|
1997-11-30 21:14:10 -06:00
|
|
|
AC_ISC_POSIX
|
1997-11-29 20:39:58 -06:00
|
|
|
AC_C_BIGENDIAN
|
1998-04-21 22:25:34 -05:00
|
|
|
AC_PROG_MAKE_SET
|
1997-11-29 20:39:58 -06:00
|
|
|
|
|
|
|
# *******************************************
|
|
|
|
# check for UI libs:
|
|
|
|
AC_PATH_X
|
1997-11-30 20:33:00 -06:00
|
|
|
AC_PATH_XTRA
|
1997-11-30 23:27:48 -06:00
|
|
|
|
1998-03-01 11:35:32 -06:00
|
|
|
LIBS="-lm"
|
1997-11-30 23:27:48 -06:00
|
|
|
# the XmHTML widget needs libz, libjpeg, libpng and libm
|
1997-12-01 04:21:12 -06:00
|
|
|
# it also uses #ifdef's not #if's so DONT #def to zero.
|
1997-11-30 23:27:48 -06:00
|
|
|
AC_CHECK_LIB(z, deflateEnd,
|
1997-12-01 04:25:27 -06:00
|
|
|
AC_DEFINE(HAVE_ZLIB,1) LIBS="-lz $LIBS")
|
1997-11-30 23:27:48 -06:00
|
|
|
AC_CHECK_LIB(jpeg, jpeg_read_scanlines,
|
1997-12-01 04:21:12 -06:00
|
|
|
AC_DEFINE(HAVE_JPEG,1) LIBS="-ljpeg $LIBS")
|
1997-11-30 23:27:48 -06:00
|
|
|
AC_CHECK_LIB(png, png_read_image,
|
1997-12-01 04:21:12 -06:00
|
|
|
AC_DEFINE(HAVE_PNG,1) LIBS="-lpng $LIBS")
|
1997-11-30 23:27:48 -06:00
|
|
|
|
1998-04-21 22:25:34 -05:00
|
|
|
# This should be done in the OTHER_LIBRARIES argument to AC_CHECK_LIB
|
|
|
|
# if it's actually needed and Makefile.in's should be using
|
|
|
|
# X_PRE_LIBS, X_LIBS, and X_EXTRA_LIBS, rather than relying on LIBS.
|
|
|
|
# LIBS="-lXmu -lXt -lXext $X_PRE_LIBS -lX11 $X_LIBS $X_EXTRA_LIBS $LIBS"
|
1997-11-30 23:27:48 -06:00
|
|
|
|
1997-11-30 20:33:00 -06:00
|
|
|
AC_CHECK_LIB(Xpm, XpmReadFileToXpmImage,
|
1998-04-21 22:25:34 -05:00
|
|
|
AC_DEFINE(HAVE_XPM,1) X_LIBS="-lXpm $X_LIBS",
|
|
|
|
AC_DEFINE(HAVE_XPM,0), -L $x_libraries -lX11)
|
1997-11-29 20:39:58 -06:00
|
|
|
|
1998-03-01 11:35:32 -06:00
|
|
|
# *******************************************
|
1997-11-29 20:39:58 -06:00
|
|
|
AC_CONFIG_HEADER(config.h)
|
1997-11-30 20:33:00 -06:00
|
|
|
|
1998-04-21 22:25:34 -05:00
|
|
|
AC_OUTPUT(xacc Makefile src/Makefile src/engine/Makefile src/gnome/Makefile src/motif/Makefile src/register/Makefile lib/Makefile lib/XmHTML-1.1.0/Makefile lib/XmHTML-1.1.0/src/Makefile lib/Xbae-4.6.2-linas/Makefile lib/Xbae-4.6.2-linas/src/Makefile lib/ComboBox-1.33/Makefile)
|
1998-03-01 11:35:32 -06:00
|
|
|
|
|
|
|
chmod +x xacc
|