This commit is contained in:
Ludovic Jacomme 2002-04-10 15:37:57 +00:00
parent dded1e4a51
commit e0bb5ded7b
5 changed files with 210 additions and 9 deletions

View File

@ -25,6 +25,8 @@ AC_PROG_MAKE_SET
AC_FIND_MOTIF
AC_FIND_XPM
AC_CHECK_LIB(m, sqrt)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

View File

@ -20,8 +20,8 @@ bin_PROGRAMS = druc
AM_CFLAGS = @ALLIANCE_CFLAGS@
druc_LDADD = @ALLIANCE_LIBS@ \
-L. -lVrd -lRtl -lRgs -lRcf -lRfm -lRpr -lRwi -lRut -lRds -lMpu -lMcp -lMap -lMmg -lMph \
druc_LDADD = @ALLIANCE_LIBS@ $(top_builddir)/src/libVrd.a \
-lRtl -lRgs -lRcf -lRfm -lRpr -lRwi -lRut -lRds -lMpu -lMcp -lMap -lMmg -lMph \
-lMut
druc_SOURCES = \

View File

@ -22,9 +22,178 @@ AM_PROG_LEX
AC_PROG_YACC
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_CHECK_LIB(m, sqrt)
AC_CHECK_PROGS(SED, gsed sed)
AC_PATH_XTRA
dnl
dnl Check for X stuff
dnl
dnl
dnl Check X options
dnl
if test "$with_x" = no; then
AC_MSG_ERROR([requires the X window system to compile and run.
Please do not use the configure option '--without-x'.])
fi
if test "$with_motif" = no; then
AC_MSG_ERROR([requires Motif to compile and run.
Please do not use the configure option '--without-motif'.])
fi
dnl
dnl
dnl Check for X libraries
dnl
if test "$with_x" != no; then
ice_save_LIBS="$LIBS"
ice_save_CFLAGS="$CFLAGS"
ice_save_CXXFLAGS="$CXXFLAGS"
ice_save_CPPFLAGS="$CPPFLAGS"
ice_save_LDFLAGS="$LDFLAGS"
dnl
dnl
AC_FIND_MOTIF
AC_FIND_XPM
dnl
dnl
dnl
LIBS="$LIBS $X_EXTRA_LIBS"
CFLAGS="$CFLAGS $X_CFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LDFLAGS="$LDFLAGS $X_LIBS"
dnl
dnl Check for X library
dnl
X11_LIBS=""
AC_CHECK_LIB(X11, XOpenDisplay, X11_LIBS="-lX11",,${X_PRE_LIBS} ${X_EXTRA_LIBS})
if test "$X11_LIBS" = ""; then
dnl Not having X is fatal. Let the user fix this.
AC_MSG_ERROR([The X11 library '-lX11' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.])
fi
AC_SUBST(X_LIBS)
AC_SUBST(X11_LIBS)
AC_SUBST(X_PRE_LIBS)
dnl
dnl
dnl Check for -lXintl library. Lutz Kittler <kittler@sse-erfurt.de> says
dnl that DLD-Linux with CDE wants `-lXintl' to refine `Xlcmbcurmax'.
dnl Guenther Roehrich <guenther@studbox.uni-stuttgart.de> says that
dnl we must check for `_Xlcmbcurmax' instead of `Xlcmbcurmax'.
dnl
AC_CHECK_LIB(Xintl, _Xlcmbcurmax, X11_LIBS="${X11_LIBS} -lXintl",,
${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
dnl
dnl Check for -lipc library. SCO unix is said to want that.
dnl
AC_CHECK_LIB(ipc, shmap, X11_LIBS="${X11_LIBS} -lipc",,
${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
dnl
dnl Check for X toolkit libraries
dnl
XT_LIBS=""
AC_CHECK_LIB(Xt, XtToolkitInitialize, XT_LIBS="-lXt",,
${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
if test "$XT_LIBS" = ""; then
dnl Not having Xt is fatal. Let the user fix this.
AC_MSG_ERROR([The X toolkit library '-lXt' could not be found.
Please use the configure options '--x-includes=DIR'
and '--x-libraries=DIR' to specify the X location.
See the files 'config.log' and 'ddd/config.log'
for further diagnostics.])
fi
AC_SUBST(XT_LIBS)
dnl
dnl
dnl Check for X extension libraries
dnl
dnl
XEXT_LIBS=""
AC_CHECK_LIB(Xext, XShapeQueryVersion, XEXT_LIBS="-lXext",,
${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
AC_SUBST(XEXT_LIBS)
dnl
dnl
dnl
dnl Check for Xpm library and headers
dnl
XPM_LIBS=""
if test "$xpm_includes" != "no" && test "$xpm_libraries" != "no"
then
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromXpmImage,
XPM_LIBS="-lXpm"
AC_DEFINE(HAVE_XPM),,${X_PRE_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
if test "$XPM_LIBS" != ""; then
AC_CHECK_HEADERS(X11/xpm.h xpm.h)
fi
fi
AC_SUBST(XPM_LIBS)
dnl
dnl
dnl Check for Motif widget libraries
dnl
dnl
XM_LIBS=""
XP_LIBS=""
if test "$motif_includes" != "no" && test "$motif_libraries" != "no"
then
dnl Motif 2.1 wants `-lXp' (X11R6.3 print server)
AC_CHECK_LIB(Xp, XpSelectInput,
XP_LIBS="-lXp"
AC_DEFINE(HAVE_XP),,
${X_PRE_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
AC_CHECK_LIB(Xm, XmCreateOptionMenu,
XM_LIBS="-lXm"
AC_DEFINE(HAVE_MOTIF),,
${X_PRE_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
AC_CHECK_LIB(Xm, xmUseVersion,
AC_DEFINE(HAVE_XMUSEVERSION),,
${X_PRE_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
AC_CHECK_LIB(Xm, XmInstallImage,
AC_DEFINE(HAVE_XMINSTALLIMAGE),,
${X_PRE_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
dnl
AC_CHECK_LIB(Xm, Xm21InstallImage,
AC_DEFINE(HAVE_XM21INSTALLIMAGE),,
${X_PRE_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS})
fi
if test "$XM_LIBS" = ""; then
dnl Without Motif, we won't get far. Let the user fix this.
AC_MSG_ERROR([The Motif library '-lXm' could not be found.
Please use the configure options '--with-motif-includes=DIR'
and '--with-motif-libraries=DIR' to specify the Xm location.
See the files 'config.log' and 'ddd/config.log'
for further diagnostics.])
fi
AC_SUBST(XP_LIBS)
AC_SUBST(XM_LIBS)
dnl
dnl
dnl Check for Motif properties
LIBS="$LIBS ${XM_LIBS} ${X_PRE_LIBS} ${XP_LIBS} ${XPM_LIBS} ${XEXT_LIBS} ${XT_LIBS} ${XEXT_LIBS} ${X11_LIBS} ${X_EXTRA_LIBS}"
dnl
dnl
dnl
dnl
LIBS="$ice_save_LIBS"
CFLAGS="$ice_save_CFLAGS"
CXXFLAGS="$ice_save_CXXFLAGS"
CPPFLAGS="$ice_save_CPPFLAGS"
LDFLAGS="$ice_save_LDFLAGS"
fi
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST

View File

@ -10,12 +10,45 @@ AM_CFLAGS = @ALLIANCE_CFLAGS@ @X_CFLAGS@ \
-DGRAAL_WINDOW_YMIN=\"GRAAL_WINDOW_YMIN\" \
-DGRAAL_WINDOW_SIDE=\"GRAAL_WINDOW_SIDE\"
graal_LDADD = @ALLIANCE_LIBS@ @X_LIBS@ @LINK_MOTIF@ \
# -----------------------------------------------------------------------------
# X Libraries.
# -----------------------------------------------------------------------------
# Special flags for linking with X. (-L/usr/X11R5/lib)
X_LDFLAGS = @X_LIBS@
# Motif library. (-lXm)
LIBXM = @XM_LIBS@
# Use this alternative for building `semistatic' executables
# where Motif libraries are statically linked in.
# LIBXM = -Wl,-Bstatic @XM_LIBS@ -Wl,-Bdynamic
# X extension library; needed for Athena and Motif >= 2.0. (-lXext)
LIBXEXT = @XEXT_LIBS@
# Xpm library; needed for my tool and sometimes for Motif >= 2.0. (-lXpm)
LIBXPM = @XPM_LIBS@
# Xp library; sometimes needed for Motif >= 2.1. (-lXp)
LIBXP = @XP_LIBS@
# X toolkit library. (-lXt)
LIBXT = @XT_LIBS@
# X library. (-lX11 -lSM -lICE -lnsl -lsocket)
LIBX11 = @X_PRE_LIBS@ @X11_LIBS@ @X_EXTRA_LIBS@
# All libraries shown above
ALL_X_LIBS = $(X_LDFLAGS) $(LIBXM) $(LIBXT) $(LIBXPM) \
$(LIBXP) $(LIBXEXT) $(LIBX11)
graal_LDADD = @ALLIANCE_LIBS@ $(ALL_X_LIBS) \
-lVrd -lRtl -lRgs -lRcf -lRfm -lRpr -lRwi -lRut -lRds -lMpu \
-lMap -lMmg -lMcp -lMph -lMut
INCLUDES = @INCLUDE_MOTIF@
graal_SOURCES = \
graal.c GMC_create.c GMC_create.h GMC_dialog.c GMC_dialog.h GMC.h GMC_menu.c GMC_menu.h \
GMC_message.c GMC_message.h GMC_panel.c GMC_panel.h GME_dialog.c GME_dialog.h \

View File

@ -9,7 +9,7 @@ pat_lodpaseq.c pat_pattostr.c pat_prspat.c pat_savpaseq.c \
pat_type.h ppt.h
CLEANFILES = pat_decl_y.c pat_decl_y.h pat_desc_y.h pat_desc_y.c \
pat_decl_l.c pat_desc_l.c
pat_decl_l.c
pat_decl_y.c pat_decl_y.h : $(srcdir)/pat_decl_y.y
$(YACC) -d $(YFLAGS) $(srcdir)/pat_decl_y.y && sed -e "s/yy/pat_decl_y_/g" -e "s/YY/PAT_DECL_Y_/g" y.tab.c > pat_decl_y.c && sed -e "s/yy/pat_decl_y_/g" -e "s/YY/PAT_DECL_Y_/g" y.tab.h > pat_decl_y.h
@ -20,6 +20,3 @@ pat_decl_l.c : $(srcdir)/pat_decl_l.l pat_decl_y.h
pat_desc_y.c pat_desc_y.h : $(srcdir)/pat_desc_y.y
$(YACC) -d $(YFLAGS) $(srcdir)/pat_desc_y.y && sed -e "s/yy/pat_desc_y_/g" -e "s/YY/PAT_DESC_Y_/g" y.tab.c > pat_desc_y.c && sed -e "s/yy/pat_desc_y_/g" -e "s/YY/PAT_DESC_Y_/g" y.tab.h > pat_desc_y.h
pat_desc_l.c : $(srcdir)/pat_desc_l.l pat_desc_y.h
$(LEX) -t $(srcdir)/pat_desc_l.l | sed -e "s/yy/pat_desc_y_/g" -e "s/YY/PAT_DESC_Y_/g" > pat_desc_l.c