fix for bug #28077: xboard needs to link against x11
authorArun Persaud <arun@nubati.net>
Wed, 25 Nov 2009 05:09:30 +0000 (21:09 -0800)
committerArun Persaud <arun@nubati.net>
Wed, 25 Nov 2009 17:38:12 +0000 (09:38 -0800)
hopefully fixed automake to take care of this

Makefile.am
configure.ac

index e105ba4..fe1fa7f 100644 (file)
@@ -16,7 +16,7 @@ xboard_SOURCES = backend.c backend.h backendz.h \
                 lists.c lists.h \
                 moves.c moves.h \
                 parser.l parser.h \
-                pgntags.c \
+                pgntags.c \
                 uci.c \
                 xboard.c xboard.h \
                 xedittags.c xedittags.h \
@@ -25,7 +25,7 @@ xboard_SOURCES = backend.c backend.h backendz.h \
                 xhistory.c  xhistory.h \
                 xoptions.c \
                 $(ZPY)
-xboard_LDADD = -lm @X_PRE_LIBS@ @XAW_LIBS@ @X_LIBS@ @X_EXTRA_LIBS@
+xboard_LDADD = -lm @XAW_LIBS@ @X_LIBS@ 
 
 EXTRA_DIST = pixmaps bitmaps winboard\
        xboard.texi gpl.texinfo texi2man texinfo.tex xboard.man \
index de1a92c..c6c4666 100644 (file)
@@ -107,6 +107,8 @@ AC_CHECK_FUNC(setlocale, [],
 
 AC_CHECK_LIB(seq, getpseudotty)
 
+
+dnl | check for X-libraries
 AC_PATH_XTRA
 if test -n "$no_x" ; then
   echo $PACKAGE requires the X Window System header files and libraries!
@@ -331,7 +333,6 @@ dnl| USE_PTYS=1
 
 dnl| add some libs for OS X
   *-apple-* )
-    X_LIBS="$X_LIBS -lXmu -lX11 -lXt "    
   ;;
 esac
 
@@ -408,6 +409,13 @@ enable_sigint=$enableval
 AC_DEFINE(ATTENTION, 1)])
 
 
+dnl | save all information for X in X_LIBS, also add the libraries themself
+dnl | since AC_PATH_XTRA only adds the paths
+X_LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS -lXmu -lX11 -lXt "    
+AC_SUBST(X_CFLAGS)
+AC_SUBST(X_LIBS)
+
+
 AC_CONFIG_FILES([Makefile cmail])
 AC_CONFIG_COMMANDS([test-stamp-h],[test -z "$CONFIG_HEADERS" || date > stamp-h])
 AC_CONFIG_COMMANDS([chmod-cmail],[chmod 755 cmail])