File: configure.in

package info (click to toggle)
greg 1.4-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 884 kB
  • ctags: 241
  • sloc: sh: 7,635; ansic: 273; lisp: 200; makefile: 165
file content (75 lines) | stat: -rw-r--r-- 2,409 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
dnl Process this file with autoconf to produce configure.

AC_INIT(Library/greg.c)
. ./GREG-VERSION

AC_CONFIG_HEADER(Library/config.h)

#--------------------------------------------------------------------
# Determine the host, build, and target systems
#--------------------------------------------------------------------
AC_CANONICAL_SYSTEM

HAVE_PTS_STREAM_MODULES=0
case "${target}" in
  *-sysv-*)
    HAVE_PTS_STREAM_MODULES=1
    ;;
esac
AC_DEFINE_UNQUOTED(HAVE_PTS_STREAM_MODULES, $HAVE_PTS_STREAM_MODULES)
AC_SUBST(HAVE_PTS_STREAM_MODULES)

#--------------------------------------------------------------------
# Find the compiler
#--------------------------------------------------------------------
AC_PROG_CC
AC_PROG_CPP
AM_PROG_LIBTOOL

AC_ARG_WITH(guile-path,
           [  --with-guile-path=DIR   How to call guile], ,)

AC_PATH_PROG(GUILEPATH, guile, NONE, $PATH:$with_guile_path)
if test "$GUILEPATH" = "NONE"; then
  echo "********************************************************************"
  echo "You need guile in order to use this library. If it is not in your"
  echo "path, set the correct path by calling configure with --with-guile-path"
  echo "set to the correct path (e.g. configure --with-guile-path=/usr/bin/guile)"
  echo "********************************************************************"
  AC_ERROR(No guile found - cannot continue)
fi

AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h signal.h sys/file.h sys/fcntl.h sys/ioctl.h sys/stropts.h unistd.h utime.h libguile.h)

AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL
AC_TYPE_MODE_T

AC_CHECK_FUNCS(strerror grantpt setpgid setsid tcgetpgrp tcsetpgrp waitpid)

GUILE_LIB_PATH=`$GUILEPATH -c '(display (string-append (%package-data-dir) "/" (version)))'`

AC_DEFINE_UNQUOTED(GUILE_LIB_PATH, $GUILE_LIB_PATH)

GUILE_BIN_PATH=$GUILE_LIB_PATH/greg
AC_DEFINE_UNQUOTED(GUILE_BIN_PATH, $GUILE_BIN_PATH)
AC_SUBST(GUILE_BIN_PATH)

GUILE_SCM_PATH=$GUILE_LIB_PATH/ice-9
AC_DEFINE_UNQUOTED(GUILE_SCM_PATH, $GUILE_SCM_PATH)
AC_SUBST(GUILE_SCM_PATH)

GUILE_FLAGS

AC_DEFINE_UNQUOTED(VERSION, $VERSION)
AC_SUBST(VERSION)
AC_DEFINE_UNQUOTED(MAJOR_VERSION, $MAJOR_VERSION)
AC_SUBST(MAJOR_VERSION)
AC_DEFINE_UNQUOTED(MINOR_VERSION, $MINOR_VERSION)
AC_SUBST(MINOR_VERSION)

AC_OUTPUT(Library/Makefile Library/greg Library/greg.scm Documentation/Makefile Documentation/gregdoc config.mak)