Blame external/platform.m4

Packit Service 9f2c4a
AC_ARG_WITH([os],
Packit Service 9f2c4a
            [AC_HELP_STRING([--with-os=OS_TYPE], [Type of your operation system (fedora|redhat|suse|gentoo)])]
Packit Service 9f2c4a
           )
Packit Service 9f2c4a
osname=""
Packit Service 9f2c4a
if test x"$with_os" != x ; then
Packit Service 9f2c4a
    if test x"$with_os" = xfedora || \
Packit Service 9f2c4a
       test x"$with_os" = xredhat || \
Packit Service 9f2c4a
       test x"$with_os" = xsuse || \
Packit Service 9f2c4a
       test x"$with_os" = xgentoo || \
Packit Service 9f2c4a
       test x"$with_os" = xdebian ; then
Packit Service 9f2c4a
        osname=$with_os
Packit Service 9f2c4a
    else
Packit Service 9f2c4a
        AC_MSG_ERROR([Illegal value -$with_os- for option --with-os])
Packit Service 9f2c4a
    fi
Packit Service 9f2c4a
fi
Packit Service 9f2c4a
Packit Service 9f2c4a
if test x"$osname" = x ; then
Packit Service 9f2c4a
    if test -f /etc/fedora-release ; then
Packit Service 9f2c4a
        osname="fedora"
Packit Service 9f2c4a
    elif test -f /etc/redhat-release ; then
Packit Service 9f2c4a
        osname="redhat"
Packit Service 9f2c4a
    elif test -f /etc/SuSE-release ; then
Packit Service 9f2c4a
        osname="suse"
Packit Service 9f2c4a
    elif test -f /etc/debian_version ; then
Packit Service 9f2c4a
        osname="debian"
Packit Service 9f2c4a
    elif test -f /etc/gentoo-release ; then
Packit Service 9f2c4a
        osname="gentoo"
Packit Service 9f2c4a
    fi
Packit Service 9f2c4a
Packit Service 9f2c4a
    AC_MSG_NOTICE([Detected operating system type: $osname])
Packit Service 9f2c4a
fi
Packit Service 9f2c4a
Packit Service 9f2c4a
AM_CONDITIONAL([HAVE_FEDORA], [test x"$osname" = xfedora])
Packit Service 9f2c4a
AM_CONDITIONAL([HAVE_REDHAT], [test x"$osname" = xredhat])
Packit Service 9f2c4a
AM_CONDITIONAL([HAVE_SUSE], [test x"$osname" = xsuse])
Packit Service 9f2c4a
AM_CONDITIONAL([HAVE_DEBIAN], [test x"$osname" = xdebian])
Packit Service 9f2c4a
AM_CONDITIONAL([HAVE_GENTOO], [test x"$osname" = xgentoo])
Packit Service 9f2c4a
Packit Service 9f2c4a
AC_CHECK_MEMBERS([struct ucred.pid, struct ucred.uid, struct ucred.gid], , ,
Packit Service 9f2c4a
                 [[#include <sys/socket.h>]])
Packit Service 9f2c4a
Packit Service 9f2c4a
if test x"$ac_cv_member_struct_ucred_pid" = xyes -a \
Packit Service 9f2c4a
        x"$ac_cv_member_struct_ucred_uid" = xyes -a \
Packit Service 9f2c4a
        x"$ac_cv_member_struct_ucred_gid" = xyes ; then
Packit Service 9f2c4a
    AC_DEFINE([HAVE_UCRED], [1], [Define if struct ucred is available])
Packit Service 9f2c4a
else
Packit Service 9f2c4a
    AC_MSG_ERROR([struct ucred is not available])
Packit Service 9f2c4a
fi