1*d5c9a868SElliott Hughesdnl Copyright 1996-2003,2005,2006,2008,2009 Alain Knaff. 2*d5c9a868SElliott Hughesdnl This file is part of mtools. 3*d5c9a868SElliott Hughesdnl 4*d5c9a868SElliott Hughesdnl Mtools is free software: you can redistribute it and/or modify 5*d5c9a868SElliott Hughesdnl it under the terms of the GNU General Public License as published by 6*d5c9a868SElliott Hughesdnl the Free Software Foundation, either version 3 of the License, or 7*d5c9a868SElliott Hughesdnl (at your option) any later version. 8*d5c9a868SElliott Hughesdnl 9*d5c9a868SElliott Hughesdnl Mtools is distributed in the hope that it will be useful, 10*d5c9a868SElliott Hughesdnl but WITHOUT ANY WARRANTY; without even the implied warranty of 11*d5c9a868SElliott Hughesdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12*d5c9a868SElliott Hughesdnl GNU General Public License for more details. 13*d5c9a868SElliott Hughesdnl 14*d5c9a868SElliott Hughesdnl You should have received a copy of the GNU General Public License 15*d5c9a868SElliott Hughesdnl along with Mtools. If not, see <http://www.gnu.org/licenses/>. 16*d5c9a868SElliott Hughesdnl 17*d5c9a868SElliott Hughesdnl Process this file with autoconf to produce a configure script. 18*d5c9a868SElliott HughesAC_INIT(buffer.c) 19*d5c9a868SElliott Hughesm4_include([m4/ax_lib_socket_nsl.m4]) 20*d5c9a868SElliott HughesAC_CONFIG_HEADER(config.h) 21*d5c9a868SElliott Hughes 22*d5c9a868SElliott Hughesdnl Checks for compiler 23*d5c9a868SElliott HughesAC_PROG_CC 24*d5c9a868SElliott Hughesdnl AC_PROG_CXX 25*d5c9a868SElliott HughesAC_PROG_GCC_TRADITIONAL 26*d5c9a868SElliott HughesAC_PROG_INSTALL 27*d5c9a868SElliott HughesAC_PROG_LN_S 28*d5c9a868SElliott Hughes 29*d5c9a868SElliott HughesAC_PATH_PROG(INSTALL_INFO, install-info, "") 30*d5c9a868SElliott Hughes 31*d5c9a868SElliott Hughesdnl Check for Systems 32*d5c9a868SElliott HughesAC_USE_SYSTEM_EXTENSIONS 33*d5c9a868SElliott HughesAC_CANONICAL_SYSTEM 34*d5c9a868SElliott Hughes 35*d5c9a868SElliott HughesAC_C_CONST 36*d5c9a868SElliott HughesAC_C_INLINE 37*d5c9a868SElliott Hughes 38*d5c9a868SElliott Hughesdnl Check for configuration options 39*d5c9a868SElliott Hughesdnl Enable OS/2 extended density format disks 40*d5c9a868SElliott HughesAC_ARG_ENABLE(xdf, 41*d5c9a868SElliott Hughes[ --enable-xdf support for OS/2 extended density format disks], 42*d5c9a868SElliott Hughes[if test x$enableval = xyes; then 43*d5c9a868SElliott Hughes AC_DEFINE([USE_XDF],1,[Define this if you want to use Xdf]) 44*d5c9a868SElliott Hughes XDF_IO_SRC=xdf_io.c 45*d5c9a868SElliott Hughes XDF_IO_OBJ=xdf_io.o 46*d5c9a868SElliott Hughesfi],[AC_DEFINE([USE_XDF],1,[Define this if you want to use Xdf]) 47*d5c9a868SElliott HughesXDF_IO_SRC=xdf_io.c 48*d5c9a868SElliott HughesXDF_IO_OBJ=xdf_io.o 49*d5c9a868SElliott Hughes] 50*d5c9a868SElliott Hughes) 51*d5c9a868SElliott HughesAC_SUBST(XDF_IO_SRC) 52*d5c9a868SElliott HughesAC_SUBST(XDF_IO_OBJ) 53*d5c9a868SElliott Hughes 54*d5c9a868SElliott Hughesdnl Check for configuration options 55*d5c9a868SElliott Hughesdnl Enable usage of vold on Solaris 56*d5c9a868SElliott HughesAC_ARG_ENABLE(vold, 57*d5c9a868SElliott Hughes[ --enable-vold compatibility with Solaris' vold], 58*d5c9a868SElliott Hughes[if test x$enableval = xyes; then 59*d5c9a868SElliott Hughes AC_DEFINE([USING_VOLD],1,[Define this if you use mtools together with Solaris' vold]) 60*d5c9a868SElliott Hughesfi]) 61*d5c9a868SElliott Hughes 62*d5c9a868SElliott Hughes 63*d5c9a868SElliott Hughesdnl Check for configuration options 64*d5c9a868SElliott Hughesdnl Enable usage of vold on Solaris 65*d5c9a868SElliott HughesAC_ARG_ENABLE(new-vold, 66*d5c9a868SElliott Hughes[ --enable-new-vold compatibility with Solaris' vold, new version], 67*d5c9a868SElliott Hughes[newVold=x$enableval 68*d5c9a868SElliott Hughesif test x$enableval = xyes; then 69*d5c9a868SElliott Hughes AC_DEFINE([USING_NEW_VOLD],1,[Define this if you use mtools together with the new Solaris' vold support]) 70*d5c9a868SElliott Hughesfi]) 71*d5c9a868SElliott Hughes 72*d5c9a868SElliott Hughes 73*d5c9a868SElliott Hughesdnl Check for configuration options 74*d5c9a868SElliott Hughesdnl Debugging 75*d5c9a868SElliott HughesAC_ARG_ENABLE(debug, 76*d5c9a868SElliott Hughes[ --enable-debug debugging messages], 77*d5c9a868SElliott Hughes[if test x$enableval = xyes; then 78*d5c9a868SElliott Hughes AC_DEFINE([DEBUG],1,[Define for debugging messages]) 79*d5c9a868SElliott Hughesfi]) 80*d5c9a868SElliott Hughes 81*d5c9a868SElliott Hughes 82*d5c9a868SElliott Hughesdnl Check for configuration options 83*d5c9a868SElliott Hughesdnl Raw terminal code (enabled by default) 84*d5c9a868SElliott HughesAC_ARG_ENABLE(raw_term, 85*d5c9a868SElliott Hughes[ --enable-raw-term raw terminal (readkey behaviour, default)], 86*d5c9a868SElliott Hughes[if test x$enableval = xyes; then 87*d5c9a868SElliott Hughes AC_DEFINE([USE_RAWTERM],1,[Define on non Unix OS'es which don't have the concept of tty's]) 88*d5c9a868SElliott Hughesfi], 89*d5c9a868SElliott HughesAC_DEFINE([USE_RAWTERM],1,[Define on non Unix OS'es which don't have the concept of tty's])) 90*d5c9a868SElliott Hughes 91*d5c9a868SElliott Hughes 92*d5c9a868SElliott Hughesdnl Checks for libraries. 93*d5c9a868SElliott Hughes 94*d5c9a868SElliott Hughesdnl AC_IRIX_SUN 95*d5c9a868SElliott HughesAC_CHECK_LIB(sun, getpwnam) 96*d5c9a868SElliott HughesAC_CHECK_LIB(cam, cam_open_device) 97*d5c9a868SElliott HughesAC_CHECK_LIB(iconv, iconv) 98*d5c9a868SElliott Hughes 99*d5c9a868SElliott Hughesdnl Check for platform-specific libraries 100*d5c9a868SElliott HughesAC_CHECK_LIB(socket,main) 101*d5c9a868SElliott HughesAX_LIB_SOCKET_NSL 102*d5c9a868SElliott HughesAC_CHECK_LIB(bsd,main) 103*d5c9a868SElliott Hughes 104*d5c9a868SElliott Hughesdnl Checks for header files. 105*d5c9a868SElliott HughesAC_HEADER_STDC 106*d5c9a868SElliott HughesAC_HEADER_SYS_WAIT 107*d5c9a868SElliott HughesAC_HEADER_STDBOOL 108*d5c9a868SElliott HughesAC_CHECK_HEADERS(getopt.h stdarg.h stdlib.h unistd.h linux/unistd.h \ 109*d5c9a868SElliott Hugheslibc.h fcntl.h limits.h sys/file.h sys/ioctl.h sys/time.h strings.h string.h \ 110*d5c9a868SElliott Hughessys/param.h memory.h malloc.h io.h signal.h sys/signal.h utime.h sgtty.h \ 111*d5c9a868SElliott Hughessys/floppy.h mntent.h sys/sysmacros.h netinet/in.h netinet/tcp.h assert.h \ 112*d5c9a868SElliott Hughesiconv.h wctype.h wchar.h locale.h xlocale.h linux/fs.h) 113*d5c9a868SElliott HughesAC_CHECK_HEADERS(termio.h sys/termio.h, [break]) 114*d5c9a868SElliott HughesAC_CHECK_HEADERS(termios.h sys/termios.h, [break]) 115*d5c9a868SElliott Hughes 116*d5c9a868SElliott Hughesdnl Check for platform-specific header files 117*d5c9a868SElliott HughesAC_CHECK_HEADERS(sys/fdio.h) 118*d5c9a868SElliott HughesAC_CHECK_HEADERS(sys/socket.h arpa/inet.h netdb.h) 119*d5c9a868SElliott Hughes 120*d5c9a868SElliott Hughesdnl Check for types 121*d5c9a868SElliott HughesAC_SYS_LARGEFILE 122*d5c9a868SElliott HughesAC_TYPE_INT8_T 123*d5c9a868SElliott HughesAC_TYPE_INT16_T 124*d5c9a868SElliott HughesAC_TYPE_INT32_T 125*d5c9a868SElliott HughesAC_TYPE_UINT8_T 126*d5c9a868SElliott HughesAC_TYPE_UINT16_T 127*d5c9a868SElliott HughesAC_TYPE_UINT32_T 128*d5c9a868SElliott HughesAC_TYPE_SSIZE_T 129*d5c9a868SElliott HughesAC_TYPE_SIZE_T 130*d5c9a868SElliott HughesAC_TYPE_OFF_T 131*d5c9a868SElliott HughesAC_TYPE_SIGNAL 132*d5c9a868SElliott HughesAC_TYPE_UID_T 133*d5c9a868SElliott Hughes 134*d5c9a868SElliott HughesAC_CHECK_TYPES(caddr_t) 135*d5c9a868SElliott HughesAC_CHECK_TYPES(long long) 136*d5c9a868SElliott HughesAC_CHECK_SIZEOF(size_t) 137*d5c9a868SElliott HughesAC_CHECK_SIZEOF(off_t) 138*d5c9a868SElliott HughesAC_CHECK_SIZEOF(time_t) 139*d5c9a868SElliott HughesAC_CHECK_SIZEOF(long) 140*d5c9a868SElliott Hughes 141*d5c9a868SElliott Hughesseek_function= 142*d5c9a868SElliott Hughes 143*d5c9a868SElliott Hughesif test $ac_cv_sizeof_off_t -ge 8 ; then 144*d5c9a868SElliott Hughes seek_function=lseek 145*d5c9a868SElliott Hughesfi 146*d5c9a868SElliott Hughes 147*d5c9a868SElliott Hughesdnl Fallback if we have no suitable 64 bit seek function yet 148*d5c9a868SElliott Hughesif test X$seek_function = X ; then 149*d5c9a868SElliott Hughes AC_DEFINE([_LARGEFILE64_SOURCE],1,[Needed for off64_t / lseek64 ]) 150*d5c9a868SElliott Hughes AC_CHECK_TYPES(off64_t, 151*d5c9a868SElliott Hughes [ AC_CHECK_FUNCS(lseek64, [ seek_function=lseek64 ]) 152*d5c9a868SElliott Hughes ]) 153*d5c9a868SElliott Hughes AC_CHECK_FUNCS(stat64) 154*d5c9a868SElliott Hughes if test X$seek_function = Xlseek64 ; then 155*d5c9a868SElliott Hughes AC_MSG_CHECKING(whether lseek64 declared in unistd.h) 156*d5c9a868SElliott Hughes AC_CACHE_VAL(mtools_cv_have_lseek64_prototype, 157*d5c9a868SElliott Hughes AC_COMPILE_IFELSE( 158*d5c9a868SElliott Hughes [AC_LANG_PROGRAM([[ 159*d5c9a868SElliott Hughes #define _LARGEFILE64_SOURCE 160*d5c9a868SElliott Hughes #include <sys/types.h> 161*d5c9a868SElliott Hughes #include <unistd.h> 162*d5c9a868SElliott Hughes ]], [[extern int lseek64(int);]])], 163*d5c9a868SElliott Hughes [mtools_cv_have_lseek64_prototype=no], 164*d5c9a868SElliott Hughes [mtools_cv_have_lseek64_prototype=yes])) 165*d5c9a868SElliott Hughes AC_MSG_RESULT($mtools_cv_have_lseek64_prototype) 166*d5c9a868SElliott Hughes if test "$mtools_cv_have_lseek64_prototype" = yes; then 167*d5c9a868SElliott Hughes AC_DEFINE([HAVE_LSEEK64_PROTOTYPE],1,[Define when you have an LSEEK64 prototype]) 168*d5c9a868SElliott Hughes fi 169*d5c9a868SElliott Hughes fi 170*d5c9a868SElliott Hughesfi 171*d5c9a868SElliott Hughes 172*d5c9a868SElliott Hughesdnl Fallback if we have no suitable 64 bit seek function yet 173*d5c9a868SElliott Hughesif test X$seek_function = X ; then 174*d5c9a868SElliott Hughes AC_DEFINE([_LARGEFILE_SOURCE],1,[Might be needed for loff_t / llseek64 ]) 175*d5c9a868SElliott Hughes AC_CHECK_TYPES([loff_t, offset_t, long long], 176*d5c9a868SElliott Hughes [ AC_CHECK_FUNCS(llseek, [ seek_function=llseek ]) 177*d5c9a868SElliott Hughes ]) 178*d5c9a868SElliott Hughes 179*d5c9a868SElliott Hughes if test X$seek_function = Xllseek ; then 180*d5c9a868SElliott Hughes dnl 181*d5c9a868SElliott Hughes dnl Check to see if llseek() is declared in unistd.h. On some libc's 182*d5c9a868SElliott Hughes dnl it is, and on others it isn't..... Thank you glibc developers.... 183*d5c9a868SElliott Hughes dnl 184*d5c9a868SElliott Hughes dnl Warning! Use of --enable-gcc-wall may throw off this test. 185*d5c9a868SElliott Hughes dnl 186*d5c9a868SElliott Hughes dnl 187*d5c9a868SElliott Hughes AC_MSG_CHECKING(whether llseek declared in unistd.h) 188*d5c9a868SElliott Hughes AC_CACHE_VAL(mtools_cv_have_llseek_prototype, 189*d5c9a868SElliott Hughes AC_COMPILE_IFELSE( 190*d5c9a868SElliott Hughes [AC_LANG_PROGRAM([[ 191*d5c9a868SElliott Hughes #define _LARGEFILE_SOURCE 192*d5c9a868SElliott Hughes #define _LARGEFILE64_SOURCE 193*d5c9a868SElliott Hughes #include <sys/types.h> 194*d5c9a868SElliott Hughes #include <unistd.h> 195*d5c9a868SElliott Hughes ]], [[extern int llseek(int);]])], 196*d5c9a868SElliott Hughes [mtools_cv_have_llseek_prototype=no], 197*d5c9a868SElliott Hughes [mtools_cv_have_llseek_prototype=yes])) 198*d5c9a868SElliott Hughes AC_MSG_RESULT($mtools_cv_have_llseek_prototype) 199*d5c9a868SElliott Hughes if test "$mtools_cv_have_llseek_prototype" = yes; then 200*d5c9a868SElliott Hughes AC_DEFINE([HAVE_LLSEEK_PROTOTYPE],1,[Define when you have an LLSEEK prototype]) 201*d5c9a868SElliott Hughes fi 202*d5c9a868SElliott Hughes fi 203*d5c9a868SElliott Hughesfi 204*d5c9a868SElliott Hughes 205*d5c9a868SElliott HughesAC_CHECK_FUNCS(htons) 206*d5c9a868SElliott Hughes 207*d5c9a868SElliott Hughesdnl Apparently termio before termios is preferred by A/UX, AIX and SCO 208*d5c9a868SElliott Hughes 209*d5c9a868SElliott Hughesdnl Checks for typedefs, structures, and compiler characteristics. 210*d5c9a868SElliott HughesAC_C_CONST 211*d5c9a868SElliott HughesAC_C_INLINE 212*d5c9a868SElliott HughesAC_TYPE_SIZE_T 213*d5c9a868SElliott HughesAC_HEADER_TIME 214*d5c9a868SElliott HughesAC_STRUCT_TM 215*d5c9a868SElliott Hughes 216*d5c9a868SElliott Hughes 217*d5c9a868SElliott Hughesdnl Checks for library functions. 218*d5c9a868SElliott HughesAC_TYPE_SIGNAL 219*d5c9a868SElliott HughesAC_CHECK_FUNCS(strerror random srandom strchr strrchr lockf flock \ 220*d5c9a868SElliott Hughesstrcasecmp strncasecmp strnlen atexit on_exit getpass memmove \ 221*d5c9a868SElliott Hughesstrdup strndup strcspn strspn strtoul strtol strtoll strtoi strtoui \ 222*d5c9a868SElliott Hughesmemcpy strpbrk memset setenv seteuid setresuid setpgrp \ 223*d5c9a868SElliott Hughestcsetattr tcflush basename fchdir media_oldaliases \ 224*d5c9a868SElliott Hughessnprintf setlocale toupper_l strncasecmp_l \ 225*d5c9a868SElliott Hugheswcsdup wcscasecmp wcsnlen putwc \ 226*d5c9a868SElliott Hughesgetuserid getgroupid \ 227*d5c9a868SElliott Hughesalarm sigaction usleep) 228*d5c9a868SElliott Hughes 229*d5c9a868SElliott Hughes 230*d5c9a868SElliott HughesAC_CHECK_FUNCS(utimes utime, [break]) 231*d5c9a868SElliott HughesAC_CHECK_FUNCS(tzset gettimeofday) 232*d5c9a868SElliott Hughes 233*d5c9a868SElliott HughesCF_SYS_ERRLIST 234*d5c9a868SElliott Hughes 235*d5c9a868SElliott Hughes[ 236*d5c9a868SElliott Hugheshost_os0=`echo $host_os | sed 's/-/_/g'` 237*d5c9a868SElliott Hugheshost_os1=`echo $host_os0 | sed 's/\./_/g'` 238*d5c9a868SElliott Hugheshost_os2=`echo $host_os0 | sed 's/^\([^.]*\)\..*$/\1/g'` 239*d5c9a868SElliott Hugheshost_os3=`echo $host_os2 | sed 's/^\([^0-9]*\)[0-9]*$/\1/g'` 240*d5c9a868SElliott Hugheshost_cpu1=`echo $host_cpu | sed 's/\./_/g'` 241*d5c9a868SElliott Hugheshost_vendor1=`echo $host_vendor | sed 's/\./_/g'` 242*d5c9a868SElliott HughesHOST_ID="-DCPU_$host_cpu1 -DVENDOR_$host_vendor1 -DOS_$host_os1" 243*d5c9a868SElliott Hughesif [ $host_os1 != $host_os2 ] ; then 244*d5c9a868SElliott Hughes HOST_ID="$HOST_ID -DOS_$host_os2" 245*d5c9a868SElliott Hughesfi 246*d5c9a868SElliott Hughesif [ $host_os1 != $host_os3 ] && [ $host_os2 != $host_os3 ] ; then 247*d5c9a868SElliott Hughes HOST_ID="$HOST_ID -DOS_$host_os3" 248*d5c9a868SElliott Hughesfi 249*d5c9a868SElliott Hughes 250*d5c9a868SElliott Hughesmy_host_os=`echo $host_os1 $host_os2 $host_os3 | sort -u` 251*d5c9a868SElliott Hughesobjs=`echo $srcdir/*.c | sed 's/\.c$/.o/' ` 252*d5c9a868SElliott Hughesif [ "X$GCC" = "Xyes" ] ; then 253*d5c9a868SElliott Hughes Wall=-Wall 254*d5c9a868SElliott Hughes if [ "$host_os3" = sunos ] ; then 255*d5c9a868SElliott Hughes Wall="" 256*d5c9a868SElliott Hughes fi 257*d5c9a868SElliott Hughes if [ "$host_os3" = ultrix ] ; then 258*d5c9a868SElliott Hughes Wall="" 259*d5c9a868SElliott Hughes fi 260*d5c9a868SElliott Hughes if [ "$host_os3" = linux ] ; then 261*d5c9a868SElliott Hughes CFLAGS="$CFLAGS -fno-strength-reduce" 262*d5c9a868SElliott Hughes fi 263*d5c9a868SElliott Hughes if [ "$host_os3" = aux ] ; then 264*d5c9a868SElliott Hughes CFLAGS="$CFLAGS -ZP" 265*d5c9a868SElliott Hughes MACHDEPLIBS="-lposix -UTIL" 266*d5c9a868SElliott Hughes fi 267*d5c9a868SElliott Hughes case "${host}" in 268*d5c9a868SElliott Hughes arm*-*-linux) CFLAGS="$CFLAGS -mstructure-size-boundary=8";; 269*d5c9a868SElliott Hughes esac 270*d5c9a868SElliott Hughes CFLAGS="$CFLAGS $Wall" 271*d5c9a868SElliott Hugheselse 272*d5c9a868SElliott Hughes if [ $host_os3 = hpux ] ; then 273*d5c9a868SElliott Hughes CPPFLAGS="$CPPFLAGS -Ae" 274*d5c9a868SElliott Hughes fi 275*d5c9a868SElliott Hughes 276*d5c9a868SElliott Hughes if [ $host_os3 = xenix ] ; then 277*d5c9a868SElliott Hughes CFLAGS="$CFLAGS -M2e" 278*d5c9a868SElliott Hughes fi 279*d5c9a868SElliott Hughesfi 280*d5c9a868SElliott Hughes 281*d5c9a868SElliott Hughesif [ $host_os3 = hpux ] ; then 282*d5c9a868SElliott Hughes LDFLAGS="$LDFLAGS -z" 283*d5c9a868SElliott Hughesfi 284*d5c9a868SElliott Hughes 285*d5c9a868SElliott Hughesif [ $host_os3 = xenix ] ; then 286*d5c9a868SElliott Hughes LDFLAGS="$LDFLAGS -M2e -i -f 5000" 287*d5c9a868SElliott Hughesfi 288*d5c9a868SElliott Hughes 289*d5c9a868SElliott Hughesif [ $host_os2 = sysv4 ] ; then 290*d5c9a868SElliott Hughes SHLIB="-lc -L/usr/ucblib -lucb" 291*d5c9a868SElliott Hugheselse 292*d5c9a868SElliott Hughes SHLIB="" 293*d5c9a868SElliott Hughesfi 294*d5c9a868SElliott Hughes 295*d5c9a868SElliott Hughesif [ $host_os3 = isc ] ; then 296*d5c9a868SElliott Hughes CFLAGS="$CFLAGS -D_SYSV3" 297*d5c9a868SElliott Hughes SHLIB="-lc_s" 298*d5c9a868SElliott Hughesfi 299*d5c9a868SElliott Hughes 300*d5c9a868SElliott Hughesif [ $host_os3 = solaris -a x$newVold = xxyes ] ; then 301*d5c9a868SElliott Hughes SHLIB="$SHLIB -s -lvolmgt" 302*d5c9a868SElliott Hughesfi 303*d5c9a868SElliott Hughes 304*d5c9a868SElliott Hughesif [ $host_os3 = nextstep ] ; then 305*d5c9a868SElliott Hughes CFLAGS="$CFLAGS -DBSD" 306*d5c9a868SElliott Hughes SHLIB="" 307*d5c9a868SElliott Hughesfi 308*d5c9a868SElliott Hughes 309*d5c9a868SElliott Hughesif [ -d /usr/5lib ] ; then 310*d5c9a868SElliott Hughes extralibdir=-L/usr/5lib 311*d5c9a868SElliott Hughesfi 312*d5c9a868SElliott Hughes 313*d5c9a868SElliott Hughes] 314*d5c9a868SElliott Hughes 315*d5c9a868SElliott HughesAC_PATH_X 316*d5c9a868SElliott HughesAC_PATH_XTRA 317*d5c9a868SElliott Hughes 318*d5c9a868SElliott Hughesdnl Floppyd 319*d5c9a868SElliott HughesAC_ARG_ENABLE(floppyd, 320*d5c9a868SElliott Hughes[ --enable-floppyd floppy daemon support], 321*d5c9a868SElliott Hughes[if test x$enableval != x; then 322*d5c9a868SElliott Hughes use_floppyd=$enableval 323*d5c9a868SElliott Hughesfi]) 324*d5c9a868SElliott Hughes 325*d5c9a868SElliott Hughesif test X$use_floppyd = X -a X$no_x = X ; then 326*d5c9a868SElliott Hughes use_floppyd="yes" 327*d5c9a868SElliott Hughesfi 328*d5c9a868SElliott Hughes 329*d5c9a868SElliott Hughesif test X$use_floppyd = Xyes; then 330*d5c9a868SElliott Hughes if test X$no_x = Xyes ; then 331*d5c9a868SElliott Hughes echo "Floppyd needs X support" >&2 332*d5c9a868SElliott Hughes echo "To compile without floppyd, use ./configure --disable-floppyd" >&2 333*d5c9a868SElliott Hughes exit 1 334*d5c9a868SElliott Hughes fi 335*d5c9a868SElliott Hughes FLOPPYD="floppyd floppyd_installtest" 336*d5c9a868SElliott Hughes BINFLOPPYD="\$(DESTDIR)\$(bindir)/floppyd \$(DESTDIR)\$(bindir)/floppyd_installtest" 337*d5c9a868SElliott Hughes FLOPPYD_IO_SRC=floppyd_io.c 338*d5c9a868SElliott Hughes FLOPPYD_IO_OBJ=floppyd_io.o 339*d5c9a868SElliott Hughes AC_DEFINE([USE_FLOPPYD],1,[Define when you want to include floppyd support]) 340*d5c9a868SElliott Hughes AC_FUNC_SETPGRP 341*d5c9a868SElliott Hughes 342*d5c9a868SElliott Hughes FLOPPYD_LIBS="" 343*d5c9a868SElliott Hughes AC_CHECK_LIB(X11, XOpenDisplay, [ FLOPPYD_LIBS="-lX11 $FLOPPYD_LIBS" ]) 344*d5c9a868SElliott Hughes AC_CHECK_LIB(Xau, XauFileName, [ FLOPPYD_LIBS="-lXau $FLOPPYD_LIBS" ]) 345*d5c9a868SElliott Hugheselse 346*d5c9a868SElliott Hughes FLOPPYD= 347*d5c9a868SElliott Hughes BINFLOPPYD= 348*d5c9a868SElliott Hughes FLOPPYD_IO_SRC= 349*d5c9a868SElliott Hughes FLOPPYD_IO_OBJ= 350*d5c9a868SElliott Hughes FLOPPYD_LIBS= 351*d5c9a868SElliott Hughesfi 352*d5c9a868SElliott Hughes 353*d5c9a868SElliott Hughes 354*d5c9a868SElliott Hughes 355*d5c9a868SElliott HughesAC_SUBST(FLOPPYD_LIBS) 356*d5c9a868SElliott HughesAC_SUBST(FLOPPYD) 357*d5c9a868SElliott HughesAC_SUBST(BINFLOPPYD) 358*d5c9a868SElliott HughesAC_SUBST(FLOPPYD_IO_SRC) 359*d5c9a868SElliott HughesAC_SUBST(FLOPPYD_IO_OBJ) 360*d5c9a868SElliott Hughes 361*d5c9a868SElliott HughesAC_SUBST(extraincludedir) 362*d5c9a868SElliott HughesAC_SUBST(extralibdir) 363*d5c9a868SElliott HughesAC_SUBST(MACHDEPLIBS) 364*d5c9a868SElliott HughesAC_SUBST(SHLIB) 365*d5c9a868SElliott HughesAC_SUBST(host_cpu) 366*d5c9a868SElliott HughesAC_SUBST(HOST_ID) 367*d5c9a868SElliott HughesAC_OUTPUT(Makefile) 368