--- configure.ac.orig 2020-07-06 01:22:37 UTC +++ configure.ac @@ -351,7 +351,14 @@ if test "x$ac_cv_file__etc_centos_release" = "xyes"; t fi dnl On some distributions '-ldl' isn't automatically added to LIBS -AC_CHECK_LIB([dl], [dlopen], [LIB_DL=-ldl]) +case $host_os in + *freebsd*) + #do nothing + ;; + *) + AC_CHECK_LIB([dl], [dlopen], [LIB_DL=-ldl]) + ;; +esac AC_SUBST(LIB_DL) AC_ARG_ENABLE([privport_tracking], @@ -731,6 +738,9 @@ AC_ARG_ENABLE([georeplication], BUILD_SYNCDAEMON=no case $host_os in + freebsd*) +#do nothing + ;; linux*) #do nothing ;; @@ -1207,10 +1217,6 @@ case $host_os in ;; *freebsd*) GF_HOST_OS="GF_BSD_HOST_OS" - GF_CFLAGS="${GF_CFLAGS} -O0" - GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_BASENAME" - GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_DIRNAME" - GF_CFLAGS="${GF_CFLAGS} -D_LIBGEN_H_" GF_CFLAGS="${GF_CFLAGS} -DO_DSYNC=0" GF_CFLAGS="${GF_CFLAGS} -Dxdr_quad_t=xdr_longlong_t" GF_CFLAGS="${GF_CFLAGS} -Dxdr_u_quad_t=xdr_u_longlong_t" @@ -1508,6 +1514,13 @@ AC_SUBST(AM_LIBTOOLFLAGS) AC_SUBST(GF_NO_UNDEFINED) AC_SUBST(GF_XLATOR_DEFAULT_LDFLAGS) AC_SUBST(GF_XLATOR_LDFLAGS) +AC_SUBST(GF_XLATOR_MGNT_LIBADD) + +case $host_os in + *freebsd*) + GF_XLATOR_MGNT_LIBADD="-lutil -lprocstat" + ;; +esac CONTRIBDIR='$(top_srcdir)/contrib' AC_SUBST(CONTRIBDIR)