freeswitch_SOURCES = src/switch.c
freeswitch_CFLAGS = $(AM_CFLAGS) $(CORE_CFLAGS)
-freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread -rpath $(libdir)
-+freeswitch_LDFLAGS = $(AM_LDFLAGS) -lpthread
++freeswitch_LDFLAGS = $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) -lpthread
freeswitch_LDADD = libfreeswitch.la libs/apr/libapr-1.la
if HAVE_ODBC
AC_MSG_RESULT($enable_kernel_linux)
-dnl Check for /dev/urandom
+-AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom,
+- [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)])
+
+dnl Check for /dev/urandom ONLY when NOT cross compiling
+if test "$cross_compiling" != yes; then
- AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom,
- [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)])
++ AC_CHECK_FILE(/dev/urandom, DEV_URANDOM=/dev/urandom,
++ [AC_CHECK_FILE(/dev/random, DEV_URANDOM=/dev/random)])
+fi
dnl Checks for header files.