~ubuntu-branches/ubuntu/vivid/389-ds-base/vivid-proposed

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2014-09-03 15:32:22 UTC
  • Revision ID: package-import@ubuntu.com-20140903153222-f5t5kovnj3wr4s38
Tags: 1.3.2.23-2
* Team upload.
* Add fix-bsd.patch and support-kfreebsd.patch to fix the build failure
  on kFreeBSD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
513
513
    AC_SUBST([LIBCRYPT], [$LIBCRYPT])
514
514
    AC_DEFINE([USE_POSIX_RWLOCKS], [1], [POSIX rwlocks])
515
515
    ;;
 
516
  *-*-kfreebsd*)
 
517
    dnl Assume that BSD has the getpeereid() function.
 
518
    dnl TODO: Check for the existance of the getpeereid() function!
 
519
    AC_DEFINE([HAVE_GETPEEREID], [1], [have getpeereid])
 
520
    dnl Check if we need to link against the bsd library for the getpeereid() function.
 
521
    AC_SEARCH_LIBS([getpeereid], [bsd])
 
522
    dnl Copied stuff from Linux section above
 
523
    dnl TODO: Check for features instead of setting flags based on the host!
 
524
    AC_DEFINE([XP_UNIX], [1], [UNIX])
 
525
    AC_DEFINE([freebsd], [1], [freebsd])
 
526
    AC_DEFINE([_GNU_SOURCE], [1], [GNU Source])
 
527
    initdir='$(sysconfdir)/rc.d/init.d'
 
528
    # do arch specific kfreebsd stuff here
 
529
    case $host in
 
530
      i*86-*-linux*)
 
531
        AC_DEFINE([CPU_x86], [], [cpu type x86])
 
532
        AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
 
533
        ;;
 
534
      x86_64-*-linux*)
 
535
        AC_DEFINE([CPU_x86_64], [], [cpu type x86_64])
 
536
        AC_DEFINE([ATOMIC_64BIT_OPERATIONS], [1], [enabling atomic counter])
 
537
        ;;
 
538
    esac
 
539
    AC_MSG_CHECKING([for GCC provided 64-bit atomic bool cas function ...])
 
540
    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
 
541
                                    [[long long ptrval = 0, val = 0, newval = 1; (void)__sync_bool_compare_and_swap_8(&ptrval, val, newval);]])],
 
542
                   [AC_DEFINE([HAVE_64BIT_ATOMIC_CAS_FUNC], [1], [have 64-bit atomic bool compare and swap function provided by gcc])AC_MSG_RESULT([yes])],
 
543
                   [AC_MSG_RESULT([no])])
 
544
    AC_MSG_CHECKING([for GCC provided 64-bit atomic ops functions ...])
 
545
    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
 
546
                                    [[long long ptrval = 0, val = 0; (void)__sync_add_and_fetch_8(&ptrval, val);]])],
 
547
                   [AC_DEFINE([HAVE_64BIT_ATOMIC_OP_FUNCS], [1], [have 64-bit atomic operation functions provided by gcc])AC_MSG_RESULT([yes])],
 
548
                   [AC_MSG_RESULT([no])])
 
549
    # some programs use the native thread library directly
 
550
    THREADLIB=-lpthread
 
551
    AC_SUBST([THREADLIB], [$THREADLIB])
 
552
    LIBCRYPT=-lcrypt
 
553
    AC_SUBST([LIBCRYPT], [$LIBCRYPT])
 
554
    AC_DEFINE([USE_POSIX_RWLOCKS], [1], [POSIX rwlocks])
 
555
    ;;
516
556
  ia64-hp-hpux*)
517
557
    AC_DEFINE([XP_UNIX], [1], [UNIX])
518
558
    AC_DEFINE([hpux], [1], [HP-UX])