configure and makefile updates
authorBrenden Matthews <brenden1@rty.ca>
Mon, 22 Aug 2005 23:32:35 +0000 (23:32 +0000)
committerBrenden Matthews <brenden1@rty.ca>
Mon, 22 Aug 2005 23:32:35 +0000 (23:32 +0000)
git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@153 7f574dfc-610e-0410-a909-a81674777703

Makefile.am
autogen.sh
configure.in
doc/Makefile.am
doc/conky.1.gz
src/Makefile.am
src/config.h.in
src/conky.c

index 2ab4ca3..18eac3d 100644 (file)
@@ -1,3 +1,3 @@
 SUBDIRS = src doc
 
-EXTRA_DIST = app-admin/conky/conky-1.2.ebuild app-admin/conky/conky-1.9999.ebuild
\ No newline at end of file
+EXTRA_DIST = app-admin/conky/conky-1.2.ebuild app-admin/conky/conky-1.9999.ebuild
index e3a81c3..6c319ea 100755 (executable)
@@ -2,7 +2,7 @@
 # $Id$
 
 aclocal-1.9
-# libtoolize --force
-# autoheader
+libtoolize --force
+autoheader
 automake-1.9 -a
 autoconf
index e376e28..214a99e 100644 (file)
@@ -2,6 +2,8 @@ AC_INIT([Conky],[1.3],[brenden1@users.sourceforge.net])
 
 AM_INIT_AUTOMAKE(conky, 1.3)
 AM_CONFIG_HEADER(src/config.h)
+AC_PROG_LIBTOOL
+
 
 AC_CONFIG_FILES(
        Makefile
@@ -63,23 +65,6 @@ if test $dah != "no"; then
 fi
 
 dnl
-dnl DOUBLE_BUFFER option
-dnl
-
-dah=yes
-AC_ARG_ENABLE(double_buffer,
-[  --enable-double-buffer  enable if you want to support flicker-free operation [default=yes]],
-  [dah="$enableval"])
-
-if test $dah != "no"; then
-  AC_DEFINE(DOUBLE_BUFFER, 1, [Define if you want support for the DBE extension])
-  AC_CHECK_HEADERS([X11/extensions/Xdbe.h], [AC_DEFINE([HAVE_XDBE], 1, [Xdbe])], [XDBE_MISSING=yes])
-  if test "x$XDBE_MISSING" = xyes; then
-      AC_MSG_ERROR([something went wrong when checking for Xdbe (double buffer extension])
-  fi
-fi
-
-dnl
 dnl PROC_UPTIME option
 dnl
 
@@ -112,7 +97,7 @@ dnl
 
 want_mpd=no
 AC_ARG_ENABLE(mpd,
-[  --enable-mpd           enable if you want MPD support [default=no]],
+[  --enable-mpd            enable if you want MPD support [default=no]],
   [want_mpd="$enableval"])
 
 AM_CONDITIONAL(BUILD_MPD, test x$want_mpd == xyes)
@@ -126,7 +111,7 @@ dnl
 
 want_cairo=no
 AC_ARG_ENABLE(cairo,
-[  --enable-cairo           enable if you want Cairo support [default=no]],
+[  --enable-cairo          enable if you want Cairo support [default=no]],
   [want_cairo="$enableval"])
 
 AM_CONDITIONAL(BUILD_CAIRO, test x$want_cairo == xyes)
@@ -174,52 +159,44 @@ dnl
 dnl X
 dnl
 
+dah=yes
+AC_ARG_ENABLE(double_buffer,
+[  --enable-double-buffer  enable if you want to support flicker-free operation [default=yes]],
+  [dah="$enableval"])
+
 want_x11=yes
 AC_ARG_ENABLE(x11,
-[  --enable-x11       enable if you want X11 support [default=yes]],
-  [want_x11="$enableval"])
+[  --enable-x11            enable if you want X11 support [default=yes]],
+ [want_x11="$enableval"])
 
 
-AM_CONDITIONAL(BUILD_X11, test x$want_x11 == xyes)
+AM_CONDITIONAL(BUILD_X11, test x$want_x11)
 if test x$want_x11 == xyes; then
-AC_PATH_X
-AC_CHECK_HEADERS([X11/Xlib.h], [], [X11_MISSING=yes])
-AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]])
-AC_CHECK_LIB([Xext], [XdbeQueryExtension], [
-   X11_LIBS="$X11_LIBS -lXext"
-   AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext])
- ], [], [[-L$x_libraries $X11_LIBS]])
-    if test "x$X11_MISSING" = xyes; then
-      AC_MSG_ERROR([something went wrong when checking for X11, you're probably missing headers or it's not installed, either re-run configure with --disable-x11, or fix this])
-  fi
-  AC_DEFINE(X11, 1, [Define if you want to use X11])
-  AC_DEFINE(HAVE_X11, 1, [Define if you have X11])
-fi
-dnl AC_PATH_X if test $have_x != "yes"; then
-dnl   echo "Sorry, X is very much needed"
-dnl   exit 1
-dnl fi
-dnl AC_DEFINE(HAVE_X11, 1, [Define if you have X11])
-
-AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]])
-AC_CHECK_LIB([Xext], [XdbeQueryExtension], [
-   X11_LIBS="$X11_LIBS -lXext"
-   AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext])
- ], [], [[-L$x_libraries $X11_LIBS]])
-
-if test "$x_libraries" != ""; then
-  LDFLAGS="$LDFLAGS -L$x_libraries"
+       AC_PATH_X
+       AC_PATH_XTRA
+       CFLAGS="$CFLAGS $X_CFLAGS"
+       LIBS="$LIBS $X_LIBS $X11_LIBS"
+       LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
+       if test "x$X_DISPLAY_MISSING" = xyes; then
+               AC_MSG_ERROR([something went wrong when checking for X11, you're probably missing headers or it's not installed, either re-run configure with --disable-x11, or fix this])
+       fi
+       AC_DEFINE(X11, 1, [Define if you want to use X11])
+       AC_DEFINE(HAVE_X11, 1, [Define if you have X11])
+       if test $dah != "no"; then
+               AC_DEFINE(DOUBLE_BUFFER, 1, [Define if you want support for the DBE extension])
+               AC_CHECK_LIB(Xext, XdbeQueryExtension, [AC_DEFINE([HAVE_XDBE], 1, [Xdbe]) LIBS="$LIBS -lXext"],
+                    [AC_MSG_ERROR([something went wrong when checking for Xdbe (double buffer extension)])])
+       fi
 fi
+AM_CONDITIONAL(HAVE_X11, test x$want_x11)
+
 
-if test "$x_includes" != ""; then
-  CFLAGS="$CFLAGS -Wall -I$x_includes"
-fi
 
 dnl
 dnl Xft
 dnl
 
-if test "$want_xft" = "yes"; then
+if test x$want_xft && test x$want_x11; then
   AC_PATH_PROG(XFTCONFIG, xft-config)
   if test x$XFTCONFIG != x; then
     dnl TODO: needs more checks
@@ -265,7 +242,7 @@ dnl Some random headers
 dnl
 
 
-AC_CHECK_HEADERS([signal.h unistd.h X11/Xlib.h sys/utsname.h sys/stat.h linux/soundcard.h dirent.h])
+AC_CHECK_HEADERS([signal.h unistd.h X11/Xlib.h sys/utsname.h sys/stat.h linux/soundcard.h dirent.h mcheck.h])
 AC_CHECK_HEADERS([sys/statfs.h sys/param.h sys/mount.h])
 dnl For cairo
 
index c730b3b..f1f9728 100644 (file)
@@ -2,7 +2,6 @@ man_MANS = conky.1.gz
 
 clean-am: clean-generic mostlyclean-am
        rm -f docs.mxml
-       rm -f ${top_srcdir}/README
        rm -f conky.1.gz
 
 if HAVE_DOCSTUFF
index 8920c3b..c403a20 100644 (file)
Binary files a/doc/conky.1.gz and b/doc/conky.1.gz differ
index 474e7db..68e087a 100644 (file)
@@ -10,6 +10,7 @@ endif
 
 if BUILD_LINUX
 linux = linux.c
+PTHREAD_LIBS =  -lpthread
 endif
 
 if BUILD_SOLARIS
@@ -18,6 +19,7 @@ endif
 
 if BUILD_FREEBSD
 freebsd = freebsd.c
+PTHREAD_LIBS =  -pthread
 endif
 
 if BUILD_NETBSD
@@ -38,11 +40,7 @@ endif
 
 conky_SOURCES = common.c fs.c top.c $(linux) mail.c mixer.c $(seti) $(mpd) $(solaris) $(freebsd) $(netbsd) $(cairo) conky.c conky.h $(x11) $(mldonkey) remoted.c remoted.h remotec.c remotec.h
 
-AM_LDFLAGS = $(X11_LIBS) $(XFT_LIBS) $(CAIRO_LIBS)
-
-LDADD = $(METAR_LIBS)
-
-LIBS = -lm -lpthread
+AM_LDFLAGS = $(X11_LIBS) $(XFT_LIBS) $(CAIRO_LIBS) $(PTHREAD_LIBS) -lm
 
 EXTRA_DIST = seti.c linux.c solaris.c freebsd.c netbsd.c mpd.c libmpdclient.c \
 cairo.c libmpdclient.h top.h mldonkey.c ftp.c ftp.h x11.c
index c08ebec..1b64a4c 100644 (file)
@@ -15,6 +15,9 @@
 /* Define to 1 if you have the <dirent.h> header file. */
 #undef HAVE_DIRENT_H
 
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
 /* Define if you have getloadavg */
 #undef HAVE_GETLOADAVG
 
 /* Define if you have kstat (Solaris) */
 #undef HAVE_KSTAT
 
-/* Define if you have libXext */
-#undef HAVE_LIBXEXT
-
 /* Define to 1 if you have the <linux/soundcard.h> header file. */
 #undef HAVE_LINUX_SOUNDCARD_H
 
+/* Define to 1 if you have the <mcheck.h> header file. */
+#undef HAVE_MCHECK_H
+
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
@@ -78,9 +81,6 @@
 /* Define if you have X11 */
 #undef HAVE_X11
 
-/* Define to 1 if you have the <X11/extensions/Xdbe.h> header file. */
-#undef HAVE_X11_EXTENSIONS_XDBE_H
-
 /* Define to 1 if you have the <X11/Xlib.h> header file. */
 #undef HAVE_X11_XLIB_H
 
 
 /* Define if you are using Xft */
 #undef XFT
+
+/* Define to 1 if the X Window System is missing or not being used. */
+#undef X_DISPLAY_MISSING
index dd50bc5..cb06a51 100644 (file)
@@ -3957,7 +3957,9 @@ else if (strcasecmp(name, a) == 0 || strcasecmp(name, a) == 0)
 #ifdef OWN_WINDOW
                CONF("own_window") {
                        own_window = string_to_bool(value);
+#ifdef XDBE
                        use_xdbe = 0;
+#endif
                }
 #endif
                CONF("stippled_borders") {
@@ -4196,7 +4198,9 @@ int main(int argc, char **argv)
 #ifdef OWN_WINDOW
                case 'o':
                        own_window = 1;
+#ifdef XDBE
                        use_xdbe = 0;
+#endif
                        break;
 #endif
 #ifdef XDBE