OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [libgui/] [configure.in] - Blame information for rev 578

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
dnl Process this file with autoconf to produce configure.
2
 
3
AC_INIT(src/subcommand.h)
4
AM_INIT_AUTOMAKE(libgui, 0.0)
5
AM_CONFIG_HEADER(config.h)
6
AM_MAINTAINER_MODE
7
AC_PROG_CC
8
AC_EXEEXT
9
AC_OBJEXT
10
AC_ARG_ENABLE(install-libgui, \
11
  [  --enable-install-libgui Install libgui.a and library header files])
12
AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
13
AM_CONDITIONAL(INSTALL_LIBGUI, test x$enable_install_libgui = xyes)
14
AC_PROG_RANLIB
15
 
16
AC_FUNC_ALLOCA
17
AC_HAVE_HEADERS(stddef.h stdlib.h getopt.h unistd.h fcntl.h sys/file.h sys/wait.h string.h strings.h)
18
AC_CHECK_FUNCS(raise strdup)
19
 
20
AC_ARG_ENABLE(ide, [  --enable-ide            Enable IDE support],
21
[case "${enableval}" in
22
  yes) ide=yes ;;
23
  no)  ide=no ;;
24
  *)   AC_MSG_ERROR(bad value ${enableval} for enable-ide option) ;;
25
esac],
26
[ide=no])
27
AM_CONDITIONAL(IDE_ENABLED, test x$ide = xyes)
28
if test x$ide = xyes; then
29
  AC_DEFINE(IDE_ENABLED)
30
fi
31
 
32
# If we have random, assume we have srandom.  If we have drand48,
33
# assume we have srand48.  If we have rand, assume we have srand.
34
AC_CHECK_FUNCS(random drand48 rand, break)
35
 
36
dnl Tcl ensures that strncasecmp is provided everywhere.  But in some
37
dnl situations we might need to declare it.  We check for that case
38
dnl here.
39
AC_EGREP_CPP(strncasecmp, [#include ],
40
  AC_DEFINE(HAVE_STRNCASECMP_DECL))
41
 
42
# Tcl8.1 requires writable strings for gcc
43
 
44
if test "$GCC" = "yes"; then
45
   LIBGUI_CFLAGS=-fwritable-strings
46
else
47
   LIBGUI_CFLAGS=
48
fi
49
 
50
AC_CACHE_CHECK([for cygwin32], ide_cv_os_cygwin32,
51
[AC_EGREP_CPP(lose, [
52
#ifdef __CYGWIN32__
53
lose
54
#endif],[ide_cv_os_cygwin32=yes],[ide_cv_os_cygwin32=no])])
55
ac_win_build="no"
56
if test x$ide_cv_os_cygwin32 = xyes; then
57
  ac_win_build="yes"
58
fi
59
 
60
tmp="`cd $srcdir/library; pwd`"
61
if test x"$ac_cv_prog_CC" = xcl ; then
62
  tmp2="`cygpath --windows $tmp`"
63
  LIBGUI_LIBRARY_DIR="`echo $tmp2 | sed -e s#\\\\\\\\#/#g`"
64
else
65
  LIBGUI_LIBRARY_DIR=$tmp
66
fi
67
AC_SUBST(LIBGUI_LIBRARY_DIR)
68
 
69
# Find the init.tcl file.
70
 
71
AC_MSG_CHECKING(for init.tcl)
72
AC_CACHE_VAL(ac_cv_c_tcl_libdir,[
73
dnl currently, only check the source tree
74
if test -f $srcdir/../tcl/library/init.tcl ; then
75
  ac_cv_c_tcl_libdir=`cd $srcdir/../tcl/library; pwd`
76
elif test -f $srcdir/../tcl8.1/library/init.tcl; then
77
  ac_cv_c_tcl_libdir=`cd $srcdir/../tcl8.1/library; pwd`
78
fi
79
])
80
AC_MSG_RESULT(${ac_cv_c_tcl_libdir})
81
 
82
if test x"$ac_cv_prog_CC" = xcl; then
83
  tmp2="`cygpath --windows $ac_cv_c_tcl_libdir`"
84
  TCL_LIBRARY="`echo $tmp2 | sed -e s#\\\\\\\\#/#g`"
85
else
86
  TCL_LIBRARY=$ac_cv_c_tcl_libdir
87
fi
88
AC_SUBST(TCL_LIBRARY)
89
 
90
# Check for Tcl and Tk.
91
CYG_AC_PATH_TCLCONFIG
92
CYG_AC_LOAD_TCLCONFIG
93
CYG_AC_PATH_TKCONFIG
94
CYG_AC_LOAD_TKCONFIG
95
CYG_AC_PATH_TCLH
96
# FIXME: consider only doing this if --with-x given.
97
CYG_AC_PATH_TKH
98
CYG_AC_PATH_ITCLCONFIG
99
CYG_AC_LOAD_ITCLCONFIG
100
 
101
dnl what is the path to itclsh?
102
AC_CANONICAL_HOST
103
case ${host} in
104
*cygwin*)
105
        ITCL_DIR=itcl/itcl/win
106
        touch ac$$.c
107
        if ${CC} -c -mwin32 ac$$.c >/dev/null 2>&1; then
108
            case "$LIBGUI_CFLAGS" in
109
                *-mwin32*) ;;
110
                *) LIBGUI_CFLAGS="-mwin32 $LIBGUI_CFLAGS" ;;
111
            esac
112
        fi
113
        rm -f ac$$.o ac$$.c
114
        ;;
115
*)              ITCL_DIR=itcl/itcl/unix ;;
116
esac
117
 
118
AC_SUBST(LIBGUI_CFLAGS)
119
AC_SUBST(TCL_DEFS)
120
AC_SUBST(TK_DEFS)
121
AC_SUBST(TCLHDIR)
122
AC_SUBST(TKHDIR)
123
AC_SUBST(TK_XINCLUDES)
124
AC_SUBST(TCL_LIBS)
125
AC_SUBST(TK_BUILD_LIB_SPEC)
126
AC_SUBST(TCL_BUILD_LIB_SPEC)
127
AC_SUBST(TK_LIBS)
128
AC_SUBST(ITCL_DIR)
129
 
130
AM_CONDITIONAL(TCL_SHARED, test x$TCL_SHARED_BUILD = x1)
131
 
132
AC_SUBST(RPATH_ENVVAR)
133
 
134
AC_OUTPUT([Makefile library/Makefile src/Makefile])
135
 
136
 
137
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.