/[rdesktop]/sourceforge.net/trunk/rdesktop/configure.ac
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 833 by stargo, Tue Mar 8 03:33:36 2005 UTC revision 873 by stargo, Sat Apr 2 17:31:27 2005 UTC
# Line 20  AC_CHECK_HEADER(sys/select.h, AC_DEFINE( Line 20  AC_CHECK_HEADER(sys/select.h, AC_DEFINE(
20  AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H))  AC_CHECK_HEADER(sys/modem.h, AC_DEFINE(HAVE_SYS_MODEM_H))
21  AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H))  AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(HAVE_SYS_FILIO_H))
22  AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H))  AC_CHECK_HEADER(sys/strtio.h, AC_DEFINE(HAVE_SYS_STRTIO_H))
23    AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H))
24    AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H))
25    AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))
26    AC_CHECK_HEADER(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
27    
28  rpath=""  rpath=""
29    
# Line 179  else Line 183  else
183  fi  fi
184  AC_SUBST(SOUNDOBJ)  AC_SUBST(SOUNDOBJ)
185    
 AC_MSG_CHECKING([checking for sound support])  
   
186  #  #
187  # dirfd  # dirfd
188  #  #
# Line 264  AC_DEFUN([UTILS_FUNC_DIRFD], Line 266  AC_DEFUN([UTILS_FUNC_DIRFD],
266    
267  UTILS_FUNC_DIRFD  UTILS_FUNC_DIRFD
268    
269    #
270    # iconv
271    #
272    
273    dnl This macros shamelessly stolen from
274    dnl http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html.
275    dnl Written by Bruno Haible.
276    
277    AC_DEFUN([UTILS_FUNC_ICONV],
278    [
279      dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
280      dnl those with the standalone portable GNU libiconv installed).
281    
282      AC_ARG_WITH([libiconv-prefix],
283    [  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
284        for dir in `echo "$withval" | tr : ' '`; do
285          if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
286          if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
287        done
288       ])
289    
290      AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
291        am_cv_func_iconv="no, consider installing GNU libiconv"
292        am_cv_lib_iconv=no
293        AC_TRY_LINK([#include <stdlib.h>
294    #include <iconv.h>],
295          [iconv_t cd = iconv_open("","");
296           iconv(cd,NULL,NULL,NULL,NULL);
297           iconv_close(cd);],
298          am_cv_func_iconv=yes)
299        if test "$am_cv_func_iconv" != yes; then
300          am_save_LIBS="$LIBS"
301          LIBS="$LIBS -liconv"
302          AC_TRY_LINK([#include <stdlib.h>
303    #include <iconv.h>],
304            [iconv_t cd = iconv_open("","");
305             iconv(cd,NULL,NULL,NULL,NULL);
306             iconv_close(cd);],
307            am_cv_lib_iconv=yes
308            am_cv_func_iconv=yes)
309          LIBS="$am_save_LIBS"
310        fi
311      ])
312      if test "$am_cv_func_iconv" = yes; then
313        AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
314        AC_MSG_CHECKING([for iconv declaration])
315        AC_CACHE_VAL(am_cv_proto_iconv, [
316          AC_TRY_COMPILE([
317    #include <stdlib.h>
318    #include <iconv.h>
319    extern
320    #ifdef __cplusplus
321    "C"
322    #endif
323    #if defined(__STDC__) || defined(__cplusplus)
324    size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
325    #else
326    size_t iconv();
327    #endif
328    ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
329          am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
330        am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
331        AC_MSG_RESULT([$]{ac_t:-
332             }[$]am_cv_proto_iconv)
333        AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
334          [Define as const if the declaration of iconv() needs const.])
335      fi
336      LIBICONV=
337      if test "$am_cv_lib_iconv" = yes; then
338        LIBICONV="-liconv"
339      fi
340      AC_SUBST(LIBICONV)
341    ])
342    
343    UTILS_FUNC_ICONV
344    LIBS="$LIBS $LIBICONV"
345    
346    #
347    # socklen_t
348    # from curl
349    
350    dnl Check for socklen_t: historically on BSD it is an int, and in
351    dnl POSIX 1g it is a type of its own, but some platforms use different
352    dnl types for the argument to getsockopt, getpeername, etc.  So we
353    dnl have to test to find something that will work.
354    AC_DEFUN([TYPE_SOCKLEN_T],
355    [
356       AC_CHECK_TYPE([socklen_t], ,[
357          AC_MSG_CHECKING([for socklen_t equivalent])
358          AC_CACHE_VAL([socklen_t_equiv],
359          [
360             # Systems have either "struct sockaddr *" or
361             # "void *" as the second argument to getpeername
362             socklen_t_equiv=
363             for arg2 in "struct sockaddr" void; do
364                for t in int size_t unsigned long "unsigned long"; do
365                   AC_TRY_COMPILE([
366                      #include <sys/types.h>
367                      #include <sys/socket.h>
368    
369                      int getpeername (int, $arg2 *, $t *);
370                   ],[
371                      $t len;
372                      getpeername(0,0,&len);
373                   ],[
374                      socklen_t_equiv="$t"
375                      break
376                   ])
377                done
378             done
379    
380             if test "x$socklen_t_equiv" = x; then
381                AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
382             fi
383          ])
384          AC_MSG_RESULT($socklen_t_equiv)
385          AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
386                            [type to use in place of socklen_t if not defined])],
387          [#include <sys/types.h>
388    #include <sys/socket.h>])
389    ])
390    
391    TYPE_SOCKLEN_T
392    
393    #
394    # statfs stuff
395    #
396    AC_CHECK_HEADERS(sys/vfs.h)
397    AC_CHECK_HEADERS(sys/statvfs.h)
398    AC_CHECK_HEADERS(sys/statfs.h)
399    AC_CHECK_HEADERS(sys/param.h)
400    AC_CHECK_HEADERS(sys/mount.h)
401    
402    #################################################
403    # these tests are taken from the GNU fileutils package
404    AC_CHECKING(how to get filesystem space usage)
405    space=no
406    
407    # Test for statvfs64.
408    if test $space = no; then
409      # SVR4
410      AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64,
411      [AC_TRY_RUN([
412    #if defined(HAVE_UNISTD_H)
413    #include <unistd.h>
414    #endif
415    #include <sys/types.h>
416    #include <sys/statvfs.h>
417      main ()
418      {
419        struct statvfs64 fsd;
420        exit (statvfs64 (".", &fsd));
421      }],
422      fu_cv_sys_stat_statvfs64=yes,
423      fu_cv_sys_stat_statvfs64=no,
424      fu_cv_sys_stat_statvfs64=cross)])
425      if test $fu_cv_sys_stat_statvfs64 = yes; then
426        space=yes
427        AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available])
428      fi
429    fi
430    
431    # Perform only the link test since it seems there are no variants of the
432    # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
433    # because that got a false positive on SCO OSR5.  Adding the declaration
434    # of a `struct statvfs' causes this test to fail (as it should) on such
435    # systems.  That system is reported to work fine with STAT_STATFS4 which
436    # is what it gets when this test fails.
437    if test $space = no; then
438      # SVR4
439      AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
440                     [AC_TRY_LINK([#include <sys/types.h>
441    #include <sys/statvfs.h>],
442                                  [struct statvfs fsd; statvfs (0, &fsd);],
443                                  fu_cv_sys_stat_statvfs=yes,
444                                  fu_cv_sys_stat_statvfs=no)])
445      if test $fu_cv_sys_stat_statvfs = yes; then
446        space=yes
447        AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
448      fi
449    fi
450    
451    if test $space = no; then
452      # DEC Alpha running OSF/1
453      AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
454      AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
455      [AC_TRY_RUN([
456    #include <sys/param.h>
457    #include <sys/types.h>
458    #include <sys/mount.h>
459      main ()
460      {
461        struct statfs fsd;
462        fsd.f_fsize = 0;
463        exit (statfs (".", &fsd, sizeof (struct statfs)));
464      }],
465      fu_cv_sys_stat_statfs3_osf1=yes,
466      fu_cv_sys_stat_statfs3_osf1=no,
467      fu_cv_sys_stat_statfs3_osf1=no)])
468    
469    
470    #C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
471      if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
472        space=yes
473        AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments])
474      fi
475    fi
476    
477    if test $space = no; then
478    # AIX
479      AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
480    member (AIX, 4.3BSD)])
481      AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
482      [AC_TRY_RUN([
483    #ifdef HAVE_SYS_PARAM_H
484    #include <sys/param.h>
485    #endif
486    #ifdef HAVE_SYS_MOUNT_H
487    #include <sys/mount.h>
488    #endif
489    #ifdef HAVE_SYS_VFS_H
490    #include <sys/vfs.h>
491    #endif
492      main ()
493      {
494      struct statfs fsd;
495      fsd.f_bsize = 0;
496      exit (statfs (".", &fsd));
497      }],
498      fu_cv_sys_stat_statfs2_bsize=yes,
499      fu_cv_sys_stat_statfs2_bsize=no,
500      fu_cv_sys_stat_statfs2_bsize=no)])
501      AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
502      if test $fu_cv_sys_stat_statfs2_bsize = yes; then
503        space=yes
504        AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property])
505      fi
506    fi
507    
508    if test $space = no; then
509    # SVR3
510      AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
511      AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
512      [AC_TRY_RUN([#include <sys/types.h>
513    #include <sys/statfs.h>
514      main ()
515      {
516      struct statfs fsd;
517      exit (statfs (".", &fsd, sizeof fsd, 0));
518      }],
519        fu_cv_sys_stat_statfs4=yes,
520        fu_cv_sys_stat_statfs4=no,
521        fu_cv_sys_stat_statfs4=no)])
522      AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
523      if test $fu_cv_sys_stat_statfs4 = yes; then
524        space=yes
525        AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments])
526      fi
527    fi
528    
529    if test $space = no; then
530    # 4.4BSD and NetBSD
531      AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
532    member (4.4BSD and NetBSD)])
533      AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
534      [AC_TRY_RUN([#include <sys/types.h>
535    #ifdef HAVE_SYS_PARAM_H
536    #include <sys/param.h>
537    #endif
538    #ifdef HAVE_SYS_MOUNT_H
539    #include <sys/mount.h>
540    #endif
541      main ()
542      {
543      struct statfs fsd;
544      fsd.f_fsize = 0;
545      exit (statfs (".", &fsd));
546      }],
547      fu_cv_sys_stat_statfs2_fsize=yes,
548      fu_cv_sys_stat_statfs2_fsize=no,
549      fu_cv_sys_stat_statfs2_fsize=no)])
550      AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
551      if test $fu_cv_sys_stat_statfs2_fsize = yes; then
552        space=yes
553            AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize])
554      fi
555    fi
556    
557    if test $space = no; then
558      # Ultrix
559      AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
560      AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
561      [AC_TRY_RUN([#include <sys/types.h>
562    #ifdef HAVE_SYS_PARAM_H
563    #include <sys/param.h>
564    #endif
565    #ifdef HAVE_SYS_MOUNT_H
566    #include <sys/mount.h>
567    #endif
568    #ifdef HAVE_SYS_FS_TYPES_H
569    #include <sys/fs_types.h>
570    #endif
571      main ()
572      {
573      struct fs_data fsd;
574      /* Ultrix's statfs returns 1 for success,
575         0 for not mounted, -1 for failure.  */
576      exit (statfs (".", &fsd) != 1);
577      }],
578      fu_cv_sys_stat_fs_data=yes,
579      fu_cv_sys_stat_fs_data=no,
580      fu_cv_sys_stat_fs_data=no)])
581      AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
582      if test $fu_cv_sys_stat_fs_data = yes; then
583        space=yes
584        AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available])
585      fi
586    fi
587    
588      statxfs_includes="\
589    $ac_includes_default
590    #if HAVE_SYS_STATVFS_H
591    # include <sys/statvfs.h>
592    #endif
593    #if HAVE_SYS_VFS_H
594    # include <sys/vfs.h>
595    #endif
596    #if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H
597    # if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
598    /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
599    #  include <sys/param.h>
600    #  include <sys/mount.h>
601    # elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
602    /* Ultrix 4.4 needs these for the declaration of struct statfs.  */
603    #  include <netinet/in.h>
604    #  include <nfs/nfs_clnt.h>
605    #  include <nfs/vfs.h>
606    # endif
607    #endif
608    "
609    
610    AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
611    AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
612    AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
613    AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
614    
615    
616    # mntent
617    #
618    AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
619    AC_CHECK_FUNCS(setmntent)
620    
621  #  #
622  # IPv6  # IPv6

Legend:
Removed from v.833  
changed lines
  Added in v.873

  ViewVC Help
Powered by ViewVC 1.1.26