blob: 1e046f507db578577dcd4e7ecbf3b13c434ead20 (
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(tkZinc.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
AC_CHECK_PROGS(PERL, perl, error)
changequote()
INSTALLARCHLIB=`perl -MConfig -e 'print $Config{installarchlib}'`
TKLIB=`perl -MTk -e 'print $Tk::library'`
INSTALLPRIVLIB=`perl -MConfig -e 'print $Config{installprivlib}'`
INSTALLMAN1DIR=`perl -MConfig -e 'print $Config{installman1dir}'`
INSTALLMAN3DIR=`perl -MConfig -e 'print $Config{installman3dir}'`
changequote([, ])
AC_SUBST(INSTALLARCHLIB)
AC_SUBST(TKLIB)
AC_SUBST(INSTALLPRIVLIB)
AC_SUBST(INSTALLMAN1DIR)
AC_SUBST(INSTALLMAN3DIR)
dnl for shared library stuff
# extract version information
changequote()
ZINC_VER=`sed -n -e 's/#define ZINCVER.*\([0-9]\)$/\1/p' patchlvl.h`
ZINC_MAJOR=`sed -n -e 's/#define ZINCREV.*\([0-9]\)$/\1/p' patchlvl.h`
ZINC_VERSION=`sed -n -e 's/#define ZINCVERSION.*\([0-9][a-z][0-9]\).*/\1/p' patchlvl.h`
changequote([, ])
AC_SUBST(ZINC_VER)
AC_SUBST(ZINC_MAJOR)
AC_SUBST(ZINC_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)
|