File: configure.in

package info (click to toggle)
snack 2.2.10.20090623-dfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,764 kB
  • sloc: ansic: 32,662; sh: 8,558; tcl: 1,086; python: 761; makefile: 582
file content (168 lines) | stat: -rw-r--r-- 5,067 bytes parent folder | download | duplicates (12)
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
AC_INIT(square.c)

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

AC_ARG_WITH(snack,[  --with-snack=DIR        use Snack files from DIR],
        SNACK_DIR=$withval, SNACK_DIR=`cd ..; pwd`)

if test "x$SNACK_DIR" = "x"; then
    AC_MSG_ERROR(Could not find Snack directory)
fi
if test ! -d $SNACK_DIR; then
    AC_MSG_ERROR(Snack directory $SNACK_DIR doesn't exist)
fi

SNACK_INC_DIR="${SNACK_DIR}/generic"
SNACK_OBJ_DIR="${SNACK_DIR}/unix"
file=$SNACK_OBJ_DIR/snackConfig.sh
. $file
SNACK_STUB_LIB_FLAG=$SNACK_STUB_LIB_FLAG


#--------------------------------------------------------------------
#       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

SQUARE_INSTALL_PATH=${prefix}/lib

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

file=$TCL_BIN_DIR/tclConfig.sh
. $file
CFLAGS=$TCL_SHLIB_CFLAGS
SHLIB_LD=$TCL_SHLIB_LD
SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
CC=$TCL_CC

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

file=$TK_BIN_DIR/tkConfig.sh
. $file
XINCLUDES=$TK_XINCLUDES

#--------------------------------------------------------------------
#	Set audio related variables for the supported systems
#--------------------------------------------------------------------

system=`uname -s`-`uname -r`

AINC=""
ALIB=""

case $system in
    HP-UX-*.10.*)
	if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
	    CFLAGS=$CFLAGS
	else
	    CFLAGS="-Ae +z"
	fi
	AINC="-I/opt/audio/include"
	AFLAG="-DHPUX"
	ALIB="-L/opt/audio/lib -lAlib"
	;;
    IRIX*)
	AFLAG="-DIRIX"
        ALIB="-laudio"
	;;
    IRIX64-6.*)
	AFLAG="-DIRIX"
        ALIB="-laudio"
	;;
    Linux*)
	AFLAG="-DLinux"
	;;
    SunOS*)
	AFLAG="-DSolaris"
	;;
    *)
	AFLAG="-DOTHER"
	;;
esac

#--------------------------------------------------------------------
#	Get plug-in install path if needed
#--------------------------------------------------------------------

AC_ARG_ENABLE(plugin,[  --enable-plugin         Enable Plugin],,enableval="no")

if test "$enableval" = "yes"; then
  AC_MSG_CHECKING(Mozilla Home)
# Check for Mozilla home (install directory of netscape (plugins))
  AC_ARG_WITH(mozilla, [  --with-mozilla=DIR      will install in DIR/plugins and DIR/tclplug],
	MOZILLA_DIR=$withval, MOZILLA_DIR="$MOZILLA_HOME")
  if test -z "$MOZILLA_DIR"; then
    MOZILLA_DIR=/usr/local/lib/netscape
  fi
  if test ! -d "$MOZILLA_DIR"; then
    AC_MSG_ERROR(Mozilla home directory \"$MOZILLA_DIR\" doesn't exist: use configure --with-mozilla=MOZILLA_HOME - ie. --with-mozilla=$HOME/.netscape for a personal install)
  fi
  AC_MSG_RESULT(found. Will install plugin in \"$MOZILLA_DIR\")
  AC_SUBST(MOZILLA_DIR)
else
  AC_MSG_RESULT(will not install as plugin (normal))
fi

#--------------------------------------------------------------------
#	Disable stub support. This is necessary if you
#	want to run Snack with Tcl/Tk 8.0 up to 8.0.5
#--------------------------------------------------------------------

AC_ARG_ENABLE(stubs,[  --disable-stubs         disable stub support],,enableval2="no")

if test "$enableval2" = "no"; then
    AC_MSG_RESULT(will use stubs (normal))
    CFLAGS="$CFLAGS -DUSE_SNACK_STUBS -DUSE_TCL_STUBS"
    TCL_LIB_SPEC="${TCL_STUB_LIB_SPEC}"
    TK_LIB_SPEC="${TK_STUB_LIB_SPEC}"
    if test "$TCLVER" = "8.0"; then
        AC_MSG_WARN("You probably forgot to specify --disable-stubs")
    fi
else
    AC_MSG_RESULT(will not use stubs)
fi
#--------------------------------------------------------------------

AC_SUBST(CC)
AC_SUBST(CFLAGS)
AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(XINCLUDES)
AC_SUBST(TCL_LIB_SPEC)
AC_SUBST(TK_LIB_SPEC)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TK_SRC_DIR)
AC_SUBST(TK_LIBS)
AC_SUBST(SQUARE_INSTALL_PATH)
AC_SUBST(AINC)
AC_SUBST(AFLAG)
AC_SUBST(ALIB)
AC_SUBST(SNACK_INC_DIR)
AC_SUBST(SNACK_OBJ_DIR)
AC_SUBST(SNACK_STUB_LIB_FLAG)

AC_OUTPUT(Makefile)