blob: 0c405fb034730134a6c82a569e8d5e1b8779a167 (
plain)
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
80
81
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(tkRadar.c)
dnl builtin([include],acplcaux.m4)
#
# This one is for testing purposes
#
dnl ac_compile='echo ${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS; ${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS'
dnl ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS; ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS'
AC_CONFIG_HEADER(config.h)
AC_PROG_CC
dnl for shared library stuff
# extract version information
XRADAR_VER=`sed -n -e 's/#define XRADARVER.*\([0-9]\)$/\1/p' patchlvl.h`
XRADAR_MAJOR=`sed -n -e 's/#define XRADARREV.*\([0-9]\)$/\1/p' patchlvl.h`
XRADAR_VERSION=`sed -n -e 's/#define XRADARVERSION.*\([0-9][a-z][0-9]\).*/\1/p' patchlvl.h`
AC_SUBST(XRADAR_VER)
AC_SUBST(XRADAR_MAJOR)
AC_SUBST(XRADAR_VERSION)
builtin([include],acaux.m4)
AC_SYS_SHAREDLIB
AC_PROG_INSTALL
AC_PROG_CPP
AC_PROG_RANLIB
AC_ISC_POSIX
AC_STDC_HEADERS
AC_CHECK_HEADERS(values.h stddef.h stdarg.h limits.h strings.h string.h)
AC_CHECK_HEADERS(unistd.h memory.h stdlib.h)
AC_CHECK_HEADERS(sys/types.h sys/time.h sys/timeb.h sys/times.h)
AC_CHECK_FUNCS(gettimeofday)
AC_PATH_XTRA
#
# Add any user supplied library directories to the X flags
#
ac_setup_local_x_libs_msg="Add the correct path to LOCAL_X_LIBS,"
ac_retry_msg="and run configure again."
test -n "$LOCAL_X_LIBS" && LOCAL_X_LIBS="-L$LOCAL_X_LIBS"
#
# We need to setup CFLAGS to suppress -g flags which will prevent the linker
# from finding the libraries.
# We need to setup LDFLAGS to add the libraries paths.
#
TMP_LDFLAGS=$LDFLAGS
TMP_CFLAGS=$CFLAGS
TMP_LIBS=$LIBS
LDFLAGS="$LDFLAGS $X_LIBS $LOCAL_X_LIBS"
CFLAGS=""
LIBS="-lX11 $X_EXTRA_LIBS"
this_is_not_ok=""
XPM=""
AC_CHECK_LIB(Xpm, main,
[XPM="-lXpm"],
[echo "-lXpm not found,"
echo $ac_setup_local_x_libs_msg
echo $ac_retry_msg
this_is_not_ok="1"])
TMP_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I $x_includes"
AC_CHECK_HEADERS(X11/xpm.h)
CPPFLAGS=$TMP_CPPFLAGS
LIBS="-lXext -lX11 $X_EXTRA_LIBS"
AC_CONST
AC_MINUS_C_MINUS_O
AC_SUBST(XPM)
AC_SUBST(XMU)
AC_SUBST(LOCAL_X_LIBS)
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_OUTPUT(Makefile)
|