/[rdesktop]/jpeg/rdesktop/trunk/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 /jpeg/rdesktop/trunk/configure.ac

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

revision 857 by stargo, Sun Mar 13 13:36:04 2005 UTC revision 1253 by stargo, Sun Sep 17 10:00:55 2006 UTC
# Line 1  Line 1 
1  AC_INIT(rdesktop, 1.4.0)  AC_INIT(rdesktop, 1.5.0)
2    
3  AC_CONFIG_SRCDIR([rdesktop.c])  AC_CONFIG_SRCDIR([rdesktop.c])
4    
# Line 22  AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(H Line 22  AC_CHECK_HEADER(sys/filio.h, AC_DEFINE(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))  AC_CHECK_HEADER(locale.h, AC_DEFINE(HAVE_LOCALE_H))
24  AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H))  AC_CHECK_HEADER(langinfo.h, AC_DEFINE(HAVE_LANGINFO_H))
25  AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))  
26    AC_CHECK_TOOL(STRIP, strip, :)
27    
28  rpath=""  rpath=""
29    
# Line 150  AC_ARG_WITH(libao, Line 151  AC_ARG_WITH(libao,
151    
152  sound="yes"  sound="yes"
153  AC_ARG_WITH(sound,  AC_ARG_WITH(sound,
154      [  --with-sound            select sound system ("oss", "sgi", "sun" or "libao") ],      [  --with-sound            select sound system ("oss", "sgi", "sun", "alsa" or "libao") ],
155      [      [
156      sound="$withval"      sound="$withval"
157      ])      ])
# Line 176  elif test "$sound" = libao; then Line 177  elif test "$sound" = libao; then
177      SOUNDOBJ="rdpsnd.o rdpsnd_libao.o"      SOUNDOBJ="rdpsnd.o rdpsnd_libao.o"
178      LDFLAGS="$LDFLAGS -lao"      LDFLAGS="$LDFLAGS -lao"
179      AC_DEFINE(WITH_RDPSND)      AC_DEFINE(WITH_RDPSND)
180    elif test "$sound" = alsa; then
181        SOUNDOBJ="rdpsnd.o rdpsnd_alsa.o"
182        LDFLAGS="$LDFLAGS -lasound"
183        AC_DEFINE(WITH_RDPSND)
184  else  else
185     AC_MSG_WARN([sound support disabled])     AC_MSG_WARN([sound support disabled])
186     AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun) and libao])     AC_MSG_WARN([Currently supported systems are Open Sound System (oss), SGI AL (sgi), Sun/BSD (sun), ALSA (alsa) and libao])
187  fi  fi
188  AC_SUBST(SOUNDOBJ)  AC_SUBST(SOUNDOBJ)
189    
# Line 265  AC_DEFUN([UTILS_FUNC_DIRFD], Line 270  AC_DEFUN([UTILS_FUNC_DIRFD],
270    
271  UTILS_FUNC_DIRFD  UTILS_FUNC_DIRFD
272    
273    #
274    # iconv
275    #
276    
277    dnl This macros shamelessly stolen from
278    dnl http://gcc.gnu.org/ml/gcc-bugs/2001-06/msg01398.html.
279    dnl Written by Bruno Haible.
280    
281    AC_DEFUN([UTILS_FUNC_ICONV],
282    [
283      dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
284      dnl those with the standalone portable GNU libiconv installed).
285    
286      AC_ARG_WITH([libiconv-prefix],
287    [  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
288        for dir in `echo "$withval" | tr : ' '`; do
289          if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
290          if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
291        done
292       ])
293      AC_CHECK_HEADER(iconv.h, AC_DEFINE(HAVE_ICONV_H))
294    
295      AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
296        am_cv_func_iconv="no, consider installing GNU libiconv"
297        am_cv_lib_iconv=no
298        AC_TRY_LINK([#include <stdlib.h>
299    #include <iconv.h>],
300          [iconv_t cd = iconv_open("","");
301           iconv(cd,NULL,NULL,NULL,NULL);
302           iconv_close(cd);],
303          am_cv_func_iconv=yes)
304        if test "$am_cv_func_iconv" != yes; then
305          am_save_LIBS="$LIBS"
306          LIBS="$LIBS -liconv"
307          AC_TRY_LINK([#include <stdlib.h>
308    #include <iconv.h>],
309            [iconv_t cd = iconv_open("","");
310             iconv(cd,NULL,NULL,NULL,NULL);
311             iconv_close(cd);],
312            am_cv_lib_iconv=yes
313            am_cv_func_iconv=yes)
314          LIBS="$am_save_LIBS"
315        fi
316      ])
317      if test "$am_cv_func_iconv" = yes; then
318        AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
319        AC_MSG_CHECKING([for iconv declaration])
320        AC_CACHE_VAL(am_cv_proto_iconv, [
321          AC_TRY_COMPILE([
322    #include <stdlib.h>
323    #include <iconv.h>
324    extern
325    #ifdef __cplusplus
326    "C"
327    #endif
328    #if defined(__STDC__) || defined(__cplusplus)
329    size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
330    #else
331    size_t iconv();
332    #endif
333    ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
334          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);"])
335        am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
336        AC_MSG_RESULT([$]{ac_t:-
337             }[$]am_cv_proto_iconv)
338        AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
339          [Define as const if the declaration of iconv() needs const.])
340      fi
341      LIBICONV=
342      if test "$am_cv_lib_iconv" = yes; then
343        LIBICONV="-liconv"
344      fi
345      AC_SUBST(LIBICONV)
346    ])
347    
348    UTILS_FUNC_ICONV
349    LIBS="$LIBS $LIBICONV"
350    
351    #
352    # socklen_t
353    # from curl
354    
355    dnl Check for socklen_t: historically on BSD it is an int, and in
356    dnl POSIX 1g it is a type of its own, but some platforms use different
357    dnl types for the argument to getsockopt, getpeername, etc.  So we
358    dnl have to test to find something that will work.
359    AC_DEFUN([TYPE_SOCKLEN_T],
360    [
361       AC_CHECK_TYPE([socklen_t], ,[
362          AC_MSG_CHECKING([for socklen_t equivalent])
363          AC_CACHE_VAL([socklen_t_equiv],
364          [
365             # Systems have either "struct sockaddr *" or
366             # "void *" as the second argument to getpeername
367             socklen_t_equiv=
368             for arg2 in "struct sockaddr" void; do
369                for t in int size_t unsigned long "unsigned long"; do
370                   AC_TRY_COMPILE([
371                      #include <sys/types.h>
372                      #include <sys/socket.h>
373    
374                      int getpeername (int, $arg2 *, $t *);
375                   ],[
376                      $t len;
377                      getpeername(0,0,&len);
378                   ],[
379                      socklen_t_equiv="$t"
380                      break
381                   ])
382                done
383             done
384    
385             if test "x$socklen_t_equiv" = x; then
386                AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
387             fi
388          ])
389          AC_MSG_RESULT($socklen_t_equiv)
390          AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
391                            [type to use in place of socklen_t if not defined])],
392          [#include <sys/types.h>
393    #include <sys/socket.h>])
394    ])
395    
396    TYPE_SOCKLEN_T
397    
398    #
399    # statfs stuff
400    #
401    AC_CHECK_HEADERS(sys/vfs.h)
402    AC_CHECK_HEADERS(sys/statvfs.h)
403    AC_CHECK_HEADERS(sys/statfs.h)
404    AC_CHECK_HEADERS(sys/param.h)
405    
406    mount_includes="\
407      $ac_includes_default
408      #if HAVE_SYS_PARAM_H
409      # include <sys/param.h>
410      #endif
411      "
412    
413    AC_CHECK_HEADERS(sys/mount.h,,,[$mount_includes])
414    
415    #################################################
416    # these tests are taken from the GNU fileutils package
417    AC_CHECKING(how to get filesystem space usage)
418    space=no
419    
420    # Test for statvfs64.
421    if test $space = no; then
422      # SVR4
423      AC_CACHE_CHECK([statvfs64 function (SVR4)], fu_cv_sys_stat_statvfs64,
424      [AC_TRY_RUN([
425    #if defined(HAVE_UNISTD_H)
426    #include <unistd.h>
427    #endif
428    #include <sys/types.h>
429    #include <sys/statvfs.h>
430      main ()
431      {
432        struct statvfs64 fsd;
433        exit (statvfs64 (".", &fsd));
434      }],
435      fu_cv_sys_stat_statvfs64=yes,
436      fu_cv_sys_stat_statvfs64=no,
437      fu_cv_sys_stat_statvfs64=cross)])
438      if test $fu_cv_sys_stat_statvfs64 = yes; then
439        space=yes
440        AC_DEFINE(STAT_STATVFS64,1,[Whether statvfs64() is available])
441      fi
442    fi
443    
444    # Perform only the link test since it seems there are no variants of the
445    # statvfs function.  This check is more than just AC_CHECK_FUNCS(statvfs)
446    # because that got a false positive on SCO OSR5.  Adding the declaration
447    # of a `struct statvfs' causes this test to fail (as it should) on such
448    # systems.  That system is reported to work fine with STAT_STATFS4 which
449    # is what it gets when this test fails.
450    if test $space = no; then
451      # SVR4
452      AC_CACHE_CHECK([statvfs function (SVR4)], fu_cv_sys_stat_statvfs,
453                     [AC_TRY_LINK([#include <sys/types.h>
454    #include <sys/statvfs.h>],
455                                  [struct statvfs fsd; statvfs (0, &fsd);],
456                                  fu_cv_sys_stat_statvfs=yes,
457                                  fu_cv_sys_stat_statvfs=no)])
458      if test $fu_cv_sys_stat_statvfs = yes; then
459        space=yes
460        AC_DEFINE(STAT_STATVFS,1,[Whether statvfs() is available])
461      fi
462    fi
463    
464    if test $space = no; then
465      # DEC Alpha running OSF/1
466      AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)])
467      AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1,
468      [AC_TRY_RUN([
469    #include <sys/param.h>
470    #include <sys/types.h>
471    #include <sys/mount.h>
472      main ()
473      {
474        struct statfs fsd;
475        fsd.f_fsize = 0;
476        exit (statfs (".", &fsd, sizeof (struct statfs)));
477      }],
478      fu_cv_sys_stat_statfs3_osf1=yes,
479      fu_cv_sys_stat_statfs3_osf1=no,
480      fu_cv_sys_stat_statfs3_osf1=no)])
481    
482    
483    #C_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1)
484      if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
485        space=yes
486        AC_DEFINE(STAT_STATFS3_OSF1,1,[Whether statfs requires 3 arguments])
487      fi
488    fi
489    
490    if test $space = no; then
491    # AIX
492      AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl
493    member (AIX, 4.3BSD)])
494      AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize,
495      [AC_TRY_RUN([
496    #ifdef HAVE_SYS_PARAM_H
497    #include <sys/param.h>
498    #endif
499    #ifdef HAVE_SYS_MOUNT_H
500    #include <sys/mount.h>
501    #endif
502    #ifdef HAVE_SYS_VFS_H
503    #include <sys/vfs.h>
504    #endif
505      main ()
506      {
507      struct statfs fsd;
508      fsd.f_bsize = 0;
509      exit (statfs (".", &fsd));
510      }],
511      fu_cv_sys_stat_statfs2_bsize=yes,
512      fu_cv_sys_stat_statfs2_bsize=no,
513      fu_cv_sys_stat_statfs2_bsize=no)])
514      AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize)
515      if test $fu_cv_sys_stat_statfs2_bsize = yes; then
516        space=yes
517        AC_DEFINE(STAT_STATFS2_BSIZE,1,[Whether statfs requires two arguments and struct statfs has bsize property])
518      fi
519    fi
520    
521    if test $space = no; then
522    # SVR3
523      AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)])
524      AC_CACHE_VAL(fu_cv_sys_stat_statfs4,
525      [AC_TRY_RUN([#include <sys/types.h>
526    #include <sys/statfs.h>
527      main ()
528      {
529      struct statfs fsd;
530      exit (statfs (".", &fsd, sizeof fsd, 0));
531      }],
532        fu_cv_sys_stat_statfs4=yes,
533        fu_cv_sys_stat_statfs4=no,
534        fu_cv_sys_stat_statfs4=no)])
535      AC_MSG_RESULT($fu_cv_sys_stat_statfs4)
536      if test $fu_cv_sys_stat_statfs4 = yes; then
537        space=yes
538        AC_DEFINE(STAT_STATFS4,1,[Whether statfs requires 4 arguments])
539      fi
540    fi
541    
542    if test $space = no; then
543    # 4.4BSD and NetBSD
544      AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl
545    member (4.4BSD and NetBSD)])
546      AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize,
547      [AC_TRY_RUN([#include <sys/types.h>
548    #ifdef HAVE_SYS_PARAM_H
549    #include <sys/param.h>
550    #endif
551    #ifdef HAVE_SYS_MOUNT_H
552    #include <sys/mount.h>
553    #endif
554      main ()
555      {
556      struct statfs fsd;
557      fsd.f_fsize = 0;
558      exit (statfs (".", &fsd));
559      }],
560      fu_cv_sys_stat_statfs2_fsize=yes,
561      fu_cv_sys_stat_statfs2_fsize=no,
562      fu_cv_sys_stat_statfs2_fsize=no)])
563      AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize)
564      if test $fu_cv_sys_stat_statfs2_fsize = yes; then
565        space=yes
566            AC_DEFINE(STAT_STATFS2_FSIZE,1,[Whether statfs requires 2 arguments and struct statfs has fsize])
567      fi
568    fi
569    
570    if test $space = no; then
571      # Ultrix
572      AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)])
573      AC_CACHE_VAL(fu_cv_sys_stat_fs_data,
574      [AC_TRY_RUN([#include <sys/types.h>
575    #ifdef HAVE_SYS_PARAM_H
576    #include <sys/param.h>
577    #endif
578    #ifdef HAVE_SYS_MOUNT_H
579    #include <sys/mount.h>
580    #endif
581    #ifdef HAVE_SYS_FS_TYPES_H
582    #include <sys/fs_types.h>
583    #endif
584      main ()
585      {
586      struct fs_data fsd;
587      /* Ultrix's statfs returns 1 for success,
588         0 for not mounted, -1 for failure.  */
589      exit (statfs (".", &fsd) != 1);
590      }],
591      fu_cv_sys_stat_fs_data=yes,
592      fu_cv_sys_stat_fs_data=no,
593      fu_cv_sys_stat_fs_data=no)])
594      AC_MSG_RESULT($fu_cv_sys_stat_fs_data)
595      if test $fu_cv_sys_stat_fs_data = yes; then
596        space=yes
597        AC_DEFINE(STAT_STATFS2_FS_DATA,1,[Whether statfs requires 2 arguments and struct fs_data is available])
598      fi
599    fi
600    
601      statxfs_includes="\
602    $ac_includes_default
603    #if HAVE_SYS_STATVFS_H
604    # include <sys/statvfs.h>
605    #endif
606    #if HAVE_SYS_VFS_H
607    # include <sys/vfs.h>
608    #endif
609    #if !HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H
610    # if HAVE_SYS_MOUNT_H && HAVE_SYS_PARAM_H
611    /* NetBSD 1.5.2 needs these, for the declaration of struct statfs. */
612    #  include <sys/param.h>
613    #  include <sys/mount.h>
614    # elif HAVE_NETINET_IN_H && HAVE_NFS_NFS_CLNT_H && HAVE_NFS_VFS_H
615    /* Ultrix 4.4 needs these for the declaration of struct statfs.  */
616    #  include <netinet/in.h>
617    #  include <nfs/nfs_clnt.h>
618    #  include <nfs/vfs.h>
619    # endif
620    #endif
621    "
622    
623    AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
624    AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
625    AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
626    AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
627    
628    #
629    # Large file support
630    #
631    AC_SYS_LARGEFILE
632    
633    #
634    # mntent
635    #
636    AC_CHECK_HEADER(mntent.h, AC_DEFINE(HAVE_MNTENT_H))
637    AC_CHECK_FUNCS(setmntent)
638    
639  #  #
640  # IPv6  # IPv6
641  #  #
642  AC_ARG_WITH(ipv6,  AC_ARG_WITH(ipv6,
643      [  --with-ipv6             enable IPv6-support],      [  --with-ipv6             enable IPv6-support],
644      [ AC_DEFINE(IPv6) ])      [
645            if test $withval != "no";
646            then
647                AC_DEFINE(IPv6,1)
648            fi
649        ])
650    
651    
652  #  #
# Line 279  AC_ARG_WITH(ipv6, Line 654  AC_ARG_WITH(ipv6,
654  #  #
655  AC_ARG_WITH(debug,  AC_ARG_WITH(debug,
656      [  --with-debug            enable protocol debugging output],      [  --with-debug            enable protocol debugging output],
657      [ AC_DEFINE(WITH_DEBUG) ])      [
658            if test $withval != "no";
659            then
660                AC_DEFINE(WITH_DEBUG,1)
661            fi
662        ])
663    
664  AC_ARG_WITH(debug-kbd,  AC_ARG_WITH(debug-kbd,
665      [  --with-debug-kbd        enable debugging of keyboard handling],      [  --with-debug-kbd        enable debugging of keyboard handling],
666      [ AC_DEFINE(WITH_DEBUG_KBD) ])      [
667            if test $withval != "no";
668            then
669                AC_DEFINE(WITH_DEBUG_KBD,1)
670            fi
671        ])
672    
673  AC_ARG_WITH(debug-rdp5,  AC_ARG_WITH(debug-rdp5,
674      [  --with-debug-rdp5       enable debugging of RDP5 code],      [  --with-debug-rdp5       enable debugging of RDP5 code],
675      [ AC_DEFINE(WITH_DEBUG_RDP5) ])      [
676            if test $withval != "no";
677            then
678                AC_DEFINE(WITH_DEBUG_RDP5,1)
679            fi
680        ])
681    
682  AC_ARG_WITH(debug-clipboard,  AC_ARG_WITH(debug-clipboard,
683      [  --with-debug-clipboard  enable debugging of clipboard code],      [  --with-debug-clipboard  enable debugging of clipboard code],
684      [ AC_DEFINE(WITH_DEBUG_CLIPBOARD) ])      [
685            if test $withval != "no";
686            then
687                AC_DEFINE(WITH_DEBUG_CLIPBOARD,1)
688            fi
689        ])
690    
691    AC_ARG_WITH(debug-channel,
692        [  --with-debug-channel  enable debugging of virtual channel code],
693        [
694            if test $withval != "no";
695            then
696                AC_DEFINE(WITH_DEBUG_CHANNEL,1)
697            fi
698        ])
699    
700    
701  #  #

Legend:
Removed from v.857  
changed lines
  Added in v.1253

  ViewVC Help
Powered by ViewVC 1.1.26