summary refs log tree commit diff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in74
1 files changed, 74 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..d672de3
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,74 @@
+dnl $Id$
+AC_INIT(calmwm.c)
+
+AC_CANONICAL_SYSTEM
+dnl AC_LIBTOOL_DLOPEN
+
+AM_INIT_AUTOMAKE(cwm, 3)
+AM_CONFIG_HEADER(config.h)
+AM_MAINTAINER_MODE
+
+AC_PROG_CC
+AC_PROG_MAKE_SET
+
+dnl intitialization
+if test "x$prefix" = "xNONE"; then
+    prefix="/usr/local"
+fi
+
+dnl Checks for programs.
+
+AC_PROG_RANLIB
+AC_PROG_INSTALL
+
+dnl ugly ugly hack	
+AC_CHECK_LIB(c, err, [ ERRO="" ], [ ERRO="err.o" ],)
+AC_SUBST(ERRO)
+
+dnl Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+
+dnl X stuff
+AC_PATH_X
+AC_PATH_XTRA
+LIBS="$X_LIBS -lX11 -lXext"
+CFLAGS="$CFLAGS $X_CFLAGS"
+
+dnl dnl Check for __progname; from OpenSSHp
+dnl AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [   
+dnl         AC_TRY_LINK([],
+dnl                 [ extern char *__progname; printf("%s", __progname); ],
+dnl                 [ ac_cv_libc_defines___progname="yes" ],
+dnl                 [ ac_cv_libc_defines___progname="no" ]
+dnl         )
+dnl ])
+dnl if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
+dnl    AC_DEFINE(HAVE___PROGNAME)
+dnl fi
+
+AC_CHECK_HEADERS(sys/time.h err.h time.h unistd.h stdint.h)
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_HEADER_TIME
+AC_CHECK_TYPE(u_int64_t, unsigned long long)
+AC_CHECK_TYPE(u_int32_t, unsigned int)
+AC_CHECK_TYPE(u_int16_t, unsigned short)
+AC_CHECK_TYPE(u_int8_t, unsigned char)
+
+dnl Checks for library functions.
+AC_PROG_GCC_TRADITIONAL
+AC_TYPE_SIGNAL
+AC_CHECK_FUNCS(socket)
+AC_REPLACE_FUNCS(strlcpy strsep strlcat)
+
+PKG_CHECK_MODULES(XFT, [xft], , )
+AC_SUBST(XFT_CFLAGS)
+AC_SUBST(XFT_LIBS)
+
+AC_SUBST(LTLIBOBJS)
+
+AC_OUTPUT(Makefile)