mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-23 15:32:26 +00:00
302 lines
5.9 KiB
Plaintext
302 lines
5.9 KiB
Plaintext
|
dnl -*- shell-script -*-
|
||
|
dnl
|
||
|
dnl hfsutils - tools for reading and writing Macintosh HFS volumes
|
||
|
dnl Copyright (C) 1996-1998 Robert Leslie
|
||
|
dnl
|
||
|
dnl This program is free software; you can redistribute it and/or modify
|
||
|
dnl it under the terms of the GNU General Public License as published by
|
||
|
dnl the Free Software Foundation; either version 2 of the License, or
|
||
|
dnl (at your option) any later version.
|
||
|
dnl
|
||
|
dnl This program is distributed in the hope that it will be useful,
|
||
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
dnl GNU General Public License for more details.
|
||
|
dnl
|
||
|
dnl You should have received a copy of the GNU General Public License
|
||
|
dnl along with this program; if not, write to the Free Software
|
||
|
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
|
dnl
|
||
|
dnl $Id: configure.in,v 1.10 1998/09/15 19:19:42 rob Exp $
|
||
|
dnl
|
||
|
|
||
|
AC_INIT(libhfs/libhfs.h)
|
||
|
AC_CONFIG_HEADER(config.h)
|
||
|
|
||
|
AC_CONFIG_SUBDIRS(libhfs librsrc)
|
||
|
|
||
|
AC_ARG_WITH(tcl,
|
||
|
[ --with-tcl[=DIR] build the Tcl components], [
|
||
|
case "$with_tcl" in
|
||
|
yes|no)
|
||
|
tcl_dir="DEFAULT"
|
||
|
;;
|
||
|
*)
|
||
|
tcl_dir="$with_tcl"
|
||
|
with_tcl=yes
|
||
|
;;
|
||
|
esac
|
||
|
])
|
||
|
|
||
|
AC_ARG_WITH(tk,
|
||
|
[ --with-tk[=DIR] build the Tk components], [
|
||
|
case "$with_tk" in
|
||
|
yes|no)
|
||
|
tk_dir="DEFAULT"
|
||
|
;;
|
||
|
*)
|
||
|
tk_dir="$with_tk"
|
||
|
with_tk=yes
|
||
|
;;
|
||
|
esac
|
||
|
])
|
||
|
|
||
|
if test "$with_tk" = yes && test "$with_tcl" != yes
|
||
|
then
|
||
|
AC_MSG_ERROR(--with-tk requires --with-tcl)
|
||
|
fi
|
||
|
|
||
|
dnl Checks for programs.
|
||
|
|
||
|
AC_PROG_MAKE_SET
|
||
|
AC_PROG_CC
|
||
|
AC_PROG_INSTALL
|
||
|
AC_PROG_RANLIB
|
||
|
|
||
|
AC_PROG_GCC_TRADITIONAL
|
||
|
|
||
|
dnl Checks for header files.
|
||
|
|
||
|
AC_HEADER_STDC
|
||
|
AC_CHECK_HEADERS(unistd.h fcntl.h termios.h sys/ioctl.h)
|
||
|
|
||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||
|
|
||
|
AC_TYPE_UID_T
|
||
|
AC_TYPE_SIZE_T
|
||
|
|
||
|
AC_C_CONST
|
||
|
|
||
|
dnl Checks for library functions.
|
||
|
|
||
|
AC_REPLACE_FUNCS(strdup strerror strstr strtol)
|
||
|
AC_CHECK_FUNCS(setreuid)
|
||
|
|
||
|
AC_CACHE_CHECK(for sys_errlist, hfs_cv_decl_syserrlist, [
|
||
|
AC_TRY_LINK([], [
|
||
|
extern char *sys_errlist[];
|
||
|
extern int sys_nerr;
|
||
|
|
||
|
sys_errlist[sys_nerr - 1][0] = 0;
|
||
|
], hfs_cv_decl_syserrlist=yes, hfs_cv_decl_syserrlist=no)
|
||
|
])
|
||
|
|
||
|
if test "$hfs_cv_decl_syserrlist" = yes
|
||
|
then
|
||
|
AC_DEFINE(HAVE_SYS_ERRLIST)
|
||
|
fi
|
||
|
|
||
|
dnl Prepare target variables.
|
||
|
|
||
|
MAKE_TARGETS=""
|
||
|
INSTALL_TARGETS=""
|
||
|
|
||
|
AC_SUBST(MAKE_TARGETS)
|
||
|
AC_SUBST(INSTALL_TARGETS)
|
||
|
|
||
|
dnl Tcl configuration.
|
||
|
|
||
|
TCL_INCLUDES=""
|
||
|
TCL_LIB_SPEC=""
|
||
|
TCL_LIBS=""
|
||
|
|
||
|
AC_SUBST(TCL_INCLUDES)
|
||
|
AC_SUBST(TCL_LIB_SPEC)
|
||
|
AC_SUBST(TCL_LIBS)
|
||
|
|
||
|
if test "$with_tcl" = yes
|
||
|
then
|
||
|
AC_MSG_CHECKING(for Tcl)
|
||
|
|
||
|
found=""
|
||
|
for dir in \
|
||
|
"$tcl_dir" \
|
||
|
"$tcl_dir/lib" \
|
||
|
"$tcl_dir/../lib" \
|
||
|
/usr/local/lib \
|
||
|
/usr/local/lib/tcl* \
|
||
|
/usr/local/tcl*/lib \
|
||
|
/usr/lib \
|
||
|
/usr/lib/tcl* \
|
||
|
/usr/tcl*/lib \
|
||
|
; \
|
||
|
do
|
||
|
if test -r "$dir/tclConfig.sh"
|
||
|
then
|
||
|
found="$dir"
|
||
|
break
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
if test -z "$found"
|
||
|
then
|
||
|
AC_MSG_RESULT(cannot find installation)
|
||
|
AC_MSG_ERROR(use --without-tcl or --with-tcl=DIR)
|
||
|
fi
|
||
|
|
||
|
tcl_dir="$found"
|
||
|
. "$tcl_dir/tclConfig.sh"
|
||
|
|
||
|
AC_MSG_RESULT(version $TCL_VERSION in $tcl_dir)
|
||
|
|
||
|
AC_MSG_CHECKING(for tcl.h)
|
||
|
|
||
|
found=""
|
||
|
for dir in \
|
||
|
$TCL_PREFIX/include \
|
||
|
$TCL_PREFIX/include/tcl* \
|
||
|
$TCL_PREFIX/tcl*/include \
|
||
|
"$tcl_dir" \
|
||
|
"$tcl_dir/include" \
|
||
|
"$tcl_dir/../include" \
|
||
|
`echo "$tcl_dir" | sed -e 's|/lib|/include|'` \
|
||
|
; \
|
||
|
do
|
||
|
if test -r "$dir/tcl.h"
|
||
|
then
|
||
|
found="$dir"
|
||
|
break
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
if test -z "$found"
|
||
|
then
|
||
|
AC_MSG_RESULT(not found)
|
||
|
AC_MSG_WARN(compilation of Tcl components may fail)
|
||
|
AC_MSG_WARN(edit Makefile if necessary and contact author)
|
||
|
else
|
||
|
AC_MSG_RESULT($found)
|
||
|
TCL_INCLUDES="-I$found"
|
||
|
fi
|
||
|
|
||
|
MAKE_TARGETS="$MAKE_TARGETS all_tcl"
|
||
|
INSTALL_TARGETS="$INSTALL_TARGETS install_tcl"
|
||
|
fi
|
||
|
|
||
|
dnl Tk configuration.
|
||
|
|
||
|
TK_INCLUDES=""
|
||
|
TK_LIB_SPEC=""
|
||
|
TK_LIBS=""
|
||
|
|
||
|
AC_SUBST(TK_INCLUDES)
|
||
|
AC_SUBST(TK_LIB_SPEC)
|
||
|
AC_SUBST(TK_LIBS)
|
||
|
|
||
|
if test "$with_tk" = yes
|
||
|
then
|
||
|
AC_MSG_CHECKING(for Tk)
|
||
|
|
||
|
found=""
|
||
|
for dir in \
|
||
|
"$tk_dir" \
|
||
|
"$tk_dir/lib" \
|
||
|
"$tk_dir/../lib" \
|
||
|
/usr/local/lib \
|
||
|
/usr/local/lib/tk* \
|
||
|
/usr/local/tk*/lib \
|
||
|
/usr/lib \
|
||
|
/usr/lib/tk* \
|
||
|
/usr/tk*/lib \
|
||
|
; \
|
||
|
do
|
||
|
if test -r "$dir/tkConfig.sh"
|
||
|
then
|
||
|
found="$dir"
|
||
|
break
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
if test -z "$found"
|
||
|
then
|
||
|
AC_MSG_RESULT(cannot find installation)
|
||
|
AC_MSG_ERROR(use --without-tk or --with-tk=DIR)
|
||
|
fi
|
||
|
|
||
|
tk_dir="$found"
|
||
|
. "$tk_dir/tkConfig.sh"
|
||
|
|
||
|
AC_MSG_RESULT(version $TK_VERSION in $tk_dir)
|
||
|
|
||
|
AC_MSG_CHECKING(for tk.h)
|
||
|
|
||
|
found=""
|
||
|
for dir in \
|
||
|
$TK_PREFIX/include \
|
||
|
$TK_PREFIX/include/tk* \
|
||
|
$TK_PREFIX/tk*/include \
|
||
|
"$tk_dir" \
|
||
|
"$tk_dir/include" \
|
||
|
"$tk_dir/../include" \
|
||
|
`echo "$tk_dir" | sed -e 's|/lib|/include|'` \
|
||
|
; \
|
||
|
do
|
||
|
if test -r "$dir/tk.h"
|
||
|
then
|
||
|
found="$dir"
|
||
|
break
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
if test -z "$found"
|
||
|
then
|
||
|
AC_MSG_RESULT(not found)
|
||
|
AC_MSG_WARN(compilation of Tk components may fail)
|
||
|
AC_MSG_WARN(edit Makefile if necessary and contact author)
|
||
|
else
|
||
|
AC_MSG_RESULT($found)
|
||
|
|
||
|
if test "x-I$found" != "x$TCL_INCLUDES"
|
||
|
then
|
||
|
TK_INCLUDES="-I$found"
|
||
|
fi
|
||
|
fi
|
||
|
|
||
|
TK_INCLUDES="$TK_INCLUDES $TK_XINCLUDES"
|
||
|
|
||
|
MAKE_TARGETS="$MAKE_TARGETS all_tk"
|
||
|
INSTALL_TARGETS="$INSTALL_TARGETS install_tk"
|
||
|
fi
|
||
|
|
||
|
dnl Other options.
|
||
|
|
||
|
AC_ARG_ENABLE(cli,
|
||
|
[ --disable-cli do not build or install the command-line utils])
|
||
|
|
||
|
if test "x$enable_cli" != xno
|
||
|
then
|
||
|
MAKE_TARGETS="all_cli $MAKE_TARGETS"
|
||
|
INSTALL_TARGETS="install_cli $INSTALL_TARGETS"
|
||
|
fi
|
||
|
|
||
|
AC_ARG_ENABLE(devlibs,
|
||
|
[ --enable-devlibs enable installation of the developer libraries])
|
||
|
|
||
|
if test "x$enable_devlibs" = xyes
|
||
|
then
|
||
|
MAKE_TARGETS="$MAKE_TARGETS all_lib"
|
||
|
INSTALL_TARGETS="$INSTALL_TARGETS install_lib"
|
||
|
fi
|
||
|
|
||
|
AC_ARG_ENABLE(debug,
|
||
|
[ --enable-debug enable diagnostic debugging support])
|
||
|
|
||
|
if test "x$enable_debug" = xyes
|
||
|
then
|
||
|
AC_DEFINE(DEBUG)
|
||
|
fi
|
||
|
|
||
|
dnl Create output files.
|
||
|
|
||
|
AC_OUTPUT(hfsck/Makefile linux/Makefile Makefile)
|