File: configure.in

package info (click to toggle)
snack 2.2.10-dfsg1-9%2Bsqueeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 3,020 kB
  • ctags: 3,550
  • sloc: ansic: 35,473; sh: 8,557; tcl: 1,065; python: 701; makefile: 566
file content (105 lines) | stat: -rw-r--r-- 3,132 bytes parent folder | download | duplicates (11)
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
100
101
102
103
104
105
#! /bin/bash -norc
dnl	This file is an input file used by the GNU "autoconf" program to
dnl	generate the file "configure", which is run during Snack installation
dnl	to configure the system for the local environment.
AC_INIT(../generic/snack.h)

SNACK_VERSION=`sh $srcdir/sver.sh $srcdir/../generic/snack.h`
SNACK_NODOT_VERSION=`echo $SNACK_VERSION | tr -d .`

AC_CHECK_HEADER(stdint.h)

#--------------------------------------------------------------------
#       See if there was a command-line option for where Tcl is;  if
#       not, assume that its top-level directory is a sibling of ours.
#--------------------------------------------------------------------

SC_PATH_TCLCONFIG

#--------------------------------------------------------------------
#       See if there was a command-line option for where Tk is;  if
#       not, assume that its top-level directory is a sibling of ours.
#--------------------------------------------------------------------

SC_PATH_TKCONFIG

#--------------------------------------------------------------------

if test "x${prefix}" = "xNONE"; then
    prefix=/usr/local
fi
if test "x${exec_prefix}" = "xNONE"; then
    exec_prefix=$prefix
fi

SNACK_INSTALL_PATH=${libdir}
SNACK_HINSTALL_PATH=${includedir}
SNACK_LIB_SPEC="-L${libdir} -lsnack"

#--------------------------------------------------------------------
#       Read in configuration information generated by Tcl and
#	arrange for it to be substituted into our Makefile.
#--------------------------------------------------------------------

file=$TCL_BIN_DIR/tclConfig.sh
. $file

if test "$TCL_SHARED_BUILD" = 0; then
    AC_MSG_ERROR(Tcl and Tk must be configured with the --enable-shared flag)
fi

#--------------------------------------------------------------------
#       Read in configuration information generated by Tk and arrange
#	for it to be substituted into our Makefile.
#--------------------------------------------------------------------

file=$TK_BIN_DIR/tkConfig.sh
. $file


SNACK_STUB_LIB_FILE="libsnackstub${SNACK_NODOT_VERSION}.a"
SNACK_STUB_LIB_FLAG="-lsnackstub${SNACK_NODOT_VERSION}"

if test "$TCL_DBGX" = ""; then
    CFLAGS="$CFLAGS $TCL_CFLAGS_OPTIMIZE"
else
    CFLAGS="$CFLAGS $TCL_CFLAGS_DEBUG"
fi

# If TCL_MEM_DEBUG is defined, add it to the CFLAGS
if (echo "$TCL_DEFS" | grep TCL_MEM_DEBUG > /dev/null) ; then
    CFLAGS="$CFLAGS -DTCL_MEM_DEBUG"
fi

# If HAVE_STDINT_H was detected, pass it to the CFLAGS
if test "$ac_cv_header_stdint_h" = "yes" ; then
    CFLAGS="$CFLAGS -DHAVE_STDINT_H"
fi


# Include files from Tcl src/build location
TCL_INCLUDE_SPEC="-I$TCL_SRC_DIR/generic"
TK_INCLUDE_SPEC="-I$TK_SRC_DIR/generic -I$TK_SRC_DIR/xlib"
TCL_LIB_SPEC=$TCL_BUILD_STUB_LIB_SPEC
TK_LIB_SPEC=$TK_BUILD_STUB_LIB_SPEC

AC_SUBST(srcdir)
AC_SUBST(CFLAGS)

AC_SUBST(SNACK_VERSION)
AC_SUBST(SNACK_NODOT_VERSION)

AC_SUBST(TCL_INCLUDE_SPEC)
AC_SUBST(TK_INCLUDE_SPEC)
AC_SUBST(TCL_LIB_SPEC)
AC_SUBST(TK_LIB_SPEC)

AC_SUBST(SNACK_INSTALL_PATH)
AC_SUBST(SNACK_HINSTALL_PATH)
AC_SUBST(SNACK_LIB_SPEC)

AC_SUBST(SNACK_STUB_LIB_FILE)
AC_SUBST(SNACK_STUB_LIB_FLAG)

AC_OUTPUT(Makefile snackConfig.sh)