Skip to content

Commit

Permalink
set up automake
Browse files Browse the repository at this point in the history
  • Loading branch information
stigsb committed Apr 24, 1999
1 parent 8dd4a63 commit 3b51655
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 9 deletions.
7 changes: 0 additions & 7 deletions TSRM/Makefile

This file was deleted.

4 changes: 4 additions & 0 deletions TSRM/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## process this file with automake to produce Makefile.am
AUTOMAKE_OPTIONS=foreign
lib_LIBRARIES=libtsrm.a
libtsrm_a_SOURCES = TSRM.c
4 changes: 2 additions & 2 deletions TSRM/TSRM.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
#ifndef _TSRM_H
#define _TSRM_H

#if !(WIN32||WINNT)
# define PTHREADS
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

#if WIN32||WINNT
Expand Down
7 changes: 7 additions & 0 deletions TSRM/acconfig.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#undef PTHREADS

#ifdef DEFINE_TSRM_VERSION
# undef PACKAGE
# undef VERSION
#endif

24 changes: 24 additions & 0 deletions TSRM/buildconf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

mv aclocal.m4 aclocal.m4.old 2>/dev/null
aclocal
if cmp aclocal.m4.old aclocal.m4 > /dev/null 2>&1; then
echo keeping ${1}aclocal.m4
mv aclocal.m4.old aclocal.m4
else
echo created or modified ${1}aclocal.m4
fi

autoheader

automake --add-missing --include-deps

mv configure configure.old 2>/dev/null
autoconf
if cmp configure.old configure > /dev/null 2>&1; then
echo keeping ${1}configure
mv configure.old configure
else
echo created or modified ${1}configure
fi

21 changes: 21 additions & 0 deletions TSRM/configure.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
dnl $Id$
dnl
dnl Minimalistic configure.in for TSRM.
dnl

AC_INIT(TSRM.c)
AM_INIT_AUTOMAKE(TSRM, 1.0)
AM_CONFIG_HEADER(tsrm_config.h)

AC_PROG_CC
AC_PROG_CC_C_O
AC_PROG_RANLIB

AC_CHECK_LIB(pthread, pthread_create, [
AC_DEFINE(PTHREADS)
LIBS="$LIBS -lpthread"
],[
AC_MSG_ERROR(You need pthreads to build TSRM.)
])

AC_OUTPUT(Makefile)

0 comments on commit 3b51655

Please sign in to comment.