File: configure.in

package info (click to toggle)
acm 4.7-6
  • links: PTS
  • area: main
  • in suites: hamm, potato, slink
  • size: 4,764 kB
  • ctags: 1,625
  • sloc: ansic: 16,776; makefile: 353; sh: 26
file content (79 lines) | stat: -rw-r--r-- 2,174 bytes parent folder | download
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
76
77
78
79
AC_INIT(README)

rand=0
random=0

if test "$OPENWINHOME" = "" ; then
	ow=/usr/openwin
else
	ow=$OPENWINHOME
fi

# Solaris special handling ...
if uname -sr | grep '^SunOS 5' >/dev/null ; then
	LIBS="$LIBS -lnsl -lelf -R/usr/ucblib -L/usr/ucblib -lucb"
fi

AC_PROG_CC
# test "$CC" = "gcc" && DEFS="$DEFS -Wall -g"
test "$CC" = "gcc" && DEFS="$DEFS -g"
AC_PROG_INSTALL
AC_PROG_RANLIB
AC_STDC_HEADERS
AC_HAVE_HEADERS(stdlib.h malloc.h unistd.h)
AC_RETSIGTYPE

if test -z "$x_includes" ; then
  AC_FIND_X
fi

# if we can't find xmkmf (OpenWin 2 and HP have this feature), then see if we
# can guess about where X lives ...
test -z "$x_includes" && test -d $ow && x_includes=${ow}/include
test -z "$x_libraries" && test -d $ow && x_libraries=${ow}/lib

test -z "$x_includes" && test -d /usr/include/X11R5 && x_includes=/usr/include/X11R5
test -z "$x_libraries" && test -d /usr/lib/X11R5 && x_libraries=/usr/lib/X11R5

test -n "$x_includes" && DEFS="$DEFS -I${x_includes}"
test -n "$x_libraries" && LIBS="$LIBS -L${x_libraries}"
AC_HAVE_LIBRARY(audio, [LIBS="$LIBS -laudio"])

LIBS="$LIBS -lX11"

AC_FUNC_CHECK(AuCloseServer, [DEFS="$DEFS -DNETAUDIO"])
AC_FUNC_CHECK(ACloseAudio, [DEFS="$DEFS -DHPAUDIO"])

AC_HAVE_LIBRARY(nsl, [LIBS="$LIBS -lnsl"])
AC_HAVE_LIBRARY(socket, [LIBS="$LIBS -lsocket"])
AC_HAVE_LIBRARY(dnet_stub, [LIBS="$LIBS -ldnet_stub"])

if uname -srv | grep '^AIX 2 3' >/dev/null ; then
    :
else
    AC_HAVE_LIBRARY(bsd, [LIBS="$LIBS -lbsd"])
fi

AC_HAVE_LIBRARY(m, [LIBS="$LIBS -lm"])
AC_REPLACE_FUNCS(strdup)
if test "$REAL_DELTA_T" != "no" ; then
	AC_FUNC_CHECK(gettimeofday, [DEFS="$DEFS -DREAL_DELTA_T"])
fi
AC_FUNC_CHECK(setsid, [DEFS="$DEFS -DHAVE_SETSID"])
AC_FUNC_CHECK(rand, [rand=1])

if test "$rand" = "1" ; then
	DEFS="$DEFS -DHAVE_RAND"
else
	AC_FUNC_CHECK(random, [random=1])
	if test "$random" = "1" ; then
		DEFS="$DEFS -DHAVE_RANDOM"
	else
		echo "Hmm. Your system does not support either random() or rand()."
		echo "ACM needs one of the random number generators to operate."
		exit 1
	fi
fi

AC_FUNC_CHECK(copysign, [DEFS="$DEFS -DHAVE_COPYSIGN"])
AC_OUTPUT(Makefile src/Makefile V/Makefile V/lib/Makefile V/test/Makefile objects/Makefile)