Browse Source

configure.ac, cleanup

rlar 14 years ago
parent
commit
cc1a011c98
  1. 53
      configure.ac

53
configure.ac

@ -225,8 +225,7 @@ if test "$enable_gprof" = "yes"; then
# feel free to extend this to include them. # feel free to extend this to include them.
if test "$GCC" = "yes"; then if test "$GCC" = "yes"; then
if test "$enable_shared" = "yes" ; then if test "$enable_shared" = "yes" ; then
AC_MSG_ERROR([Can't have --enable-gprof without --disable-shared (we
recommend also using --enable-all-static).])
AC_MSG_ERROR([Can't have --enable-gprof without --disable-shared (we recommend also using --enable-all-static).])
fi fi
if test ! "$enable_static" = "yes" ; then if test ! "$enable_static" = "yes" ; then
AC_MSG_WARN([We recommend --enable-static with --enable-gprof.]) AC_MSG_WARN([We recommend --enable-static with --enable-gprof.])
@ -306,9 +305,11 @@ if test "x$with_tcl" != "x" -a "$with_tcl" != "no" ; then
*mingw* ) *mingw* )
has_tclwin=true has_tclwin=true
has_no_help=true has_no_help=true
AC_DEFINE([HAS_TCLWIN], [1], [Tcl Windows]);;
AC_DEFINE([HAS_TCLWIN], [1], [Tcl Windows])
;;
*cygwin* ) *cygwin* )
has_tclcyg=true ;;
has_tclcyg=true
;;
*) *)
;; ;;
esac esac
@ -400,6 +401,7 @@ if test "x$with_tcl" != "x" -a "$with_tcl" != "no" ; then
fi fi
AC_MSG_CHECKING([for TCL module BLT]) AC_MSG_CHECKING([for TCL module BLT])
rm -f conftest.tcl rm -f conftest.tcl
cat > conftest.tcl << EOF cat > conftest.tcl << EOF
package require BLT; package require BLT;
@ -469,8 +471,7 @@ AC_ARG_WITH([windows],
[if test "$with_windows" = "yes"; then [if test "$with_windows" = "yes"; then
AC_DEFINE([HAS_WINDOWS], [1], [define to specify MS Windows executable]) AC_DEFINE([HAS_WINDOWS], [1], [define to specify MS Windows executable])
fi], fi],
[with_windows="no"]
)
[with_windows="no"])
AC_MSG_RESULT([$with_windows]) AC_MSG_RESULT([$with_windows])
AM_CONDITIONAL([WINDOWS], [test x$with_windows = xyes]) AM_CONDITIONAL([WINDOWS], [test x$with_windows = xyes])
@ -484,7 +485,8 @@ case $with_windows in
else else
has_no_help=true has_no_help=true
fi fi
CFLAGS="$CFLAGS -mwindows";;
CFLAGS="$CFLAGS -mwindows"
;;
* ) * )
# Check for /proc (virtual process information file system) # Check for /proc (virtual process information file system)
@ -530,8 +532,7 @@ AC_ARG_ENABLE([rpath],
_use_rpath=yes _use_rpath=yes
fi fi
], ],
[
AC_MSG_RESULT([no])
[ AC_MSG_RESULT([no])
_use_rpath=no _use_rpath=no
] ]
) )
@ -583,10 +584,13 @@ fi
# (The previous order was -lX11 -lXt -lXext -lXmu -lXaw) # (The previous order was -lX11 -lXt -lXext -lXmu -lXaw)
if test "x$no_x" != "xyes" ; then if test "x$no_x" != "xyes" ; then
AC_CHECK_LIB([Xaw], [main], [X_LIBS="$X_LIBS -lXaw"], [AC_MSG_ERROR([Couldn't find Xaw library])], [$X_LIBS $X_EXTRA_LIBS])
AC_CHECK_LIB([Xmu], [main], [X_LIBS="$X_LIBS -lXmu"], [AC_MSG_ERROR([Couldn't find Xmu library])], [$X_LIBS $X_EXTRA_LIBS])
AC_CHECK_LIB([Xaw], [main], [X_LIBS="$X_LIBS -lXaw"],
[AC_MSG_ERROR([Couldn't find Xaw library])], [$X_LIBS $X_EXTRA_LIBS])
AC_CHECK_LIB([Xmu], [main], [X_LIBS="$X_LIBS -lXmu"],
[AC_MSG_ERROR([Couldn't find Xmu library])], [$X_LIBS $X_EXTRA_LIBS])
X_LIBS="$X_LIBS -lXt" X_LIBS="$X_LIBS -lXt"
AC_CHECK_LIB([Xext], [XShmAttach], [X_LIBS="$X_LIBS -lXext"], [AC_MSG_ERROR([Couldn't find Xext library])], [$X_LIBS $X_EXTRA_LIBS])
AC_CHECK_LIB([Xext], [XShmAttach], [X_LIBS="$X_LIBS -lXext"],
[AC_MSG_ERROR([Couldn't find Xext library])], [$X_LIBS $X_EXTRA_LIBS])
X_LIBS="$X_LIBS -lX11" X_LIBS="$X_LIBS -lX11"
has_no_x=false has_no_x=false
else else
@ -695,7 +699,10 @@ AC_TRY_LINK([#include <setjmp.h>],[jmp_buf env; sigsetjmp(env, 1);],
AC_CHECK_HEADERS([libiberty.h libgen.h]) AC_CHECK_HEADERS([libiberty.h libgen.h])
# Check for the asprintf function: # Check for the asprintf function:
AC_CHECK_FUNCS([asprintf], [], [AC_CHECK_LIB([iberty], [asprintf], [AC_DEFINE([HAVE_ASPRINTF], [1], [Have asprintf in libiberty]) LIBS="$LIBS -liberty"])])
AC_CHECK_FUNCS([asprintf], [],
[AC_CHECK_LIB([iberty], [asprintf],
[AC_DEFINE([HAVE_ASPRINTF], [1], [Have asprintf in libiberty])
LIBS="$LIBS -liberty"])])
# Check for the snprintf function: # Check for the snprintf function:
if test "$ac_cv_func_asprintf" = no ; then if test "$ac_cv_func_asprintf" = no ; then
@ -703,7 +710,10 @@ if test "$ac_cv_func_asprintf" = no ; then
fi fi
# Check for the dirname function: # Check for the dirname function:
AC_CHECK_FUNCS([dirname], [], [AC_CHECK_LIB([gen], [dirname], [AC_DEFINE([HAVE_DIRNAME], [1], [Have dirname in libgen]) LIBS="$LIBS -lgen"])])
AC_CHECK_FUNCS([dirname], [],
[AC_CHECK_LIB([gen], [dirname],
[AC_DEFINE([HAVE_DIRNAME], [1], [Have dirname in libgen])
LIBS="$LIBS -lgen"])])
AC_CHECK_HEADERS([getopt.h]) AC_CHECK_HEADERS([getopt.h])
AC_CHECK_FUNC([getopt_long], [getopt_long=true]) AC_CHECK_FUNC([getopt_long], [getopt_long=true])
@ -822,19 +832,24 @@ if test "$enable_xspice" = "yes"; then
case $host_os in case $host_os in
*mingw* ) *mingw* )
AC_DEFINE([IPC_DEBUG_VIA_STDIO], [1], [Client-Server only via stdio.]) AC_DEFINE([IPC_DEBUG_VIA_STDIO], [1], [Client-Server only via stdio.])
XSPICEDLLIBS="";;
XSPICEDLLIBS=""
;;
*cygwin* ) *cygwin* )
AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.]) AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.])
XSPICEDLLIBS="" ;;
XSPICEDLLIBS=""
;;
*freebsd* ) *freebsd* )
AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.]) AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.])
XSPICEDLLIBS="";;
XSPICEDLLIBS=""
;;
*openbsd* ) *openbsd* )
AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.]) AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.])
XSPICEDLLIBS="";;
XSPICEDLLIBS=""
;;
* ) * )
AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.]) AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.])
XSPICEDLLIBS="-ldl";;
XSPICEDLLIBS="-ldl"
;;
esac esac
XSPICEINIT="" XSPICEINIT=""
AC_CHECK_FUNCS([modf]) AC_CHECK_FUNCS([modf])

Loading…
Cancel
Save