else
AM_CONDITIONAL(HAVE_LIBCURL, false)
fi
+
+
+# libidn
+AC_MSG_CHECKING([if Libidn can be used])
+AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
+ [Support IDN (needs GNU Libidn)]),
+libidn=$withval, libidn=yes)
+if test "$libidn" != "no"; then
+ if test "$libidn" != "yes"; then
+ LDFLAGS="${LDFLAGS} -L$libidn/lib"
+ CPPFLAGS="${CPPFLAGS} -I$libidn/include"
+ fi
+ AC_CHECK_HEADER(idna.h,
+ AC_CHECK_LIB(idn, stringprep_check_version,
+ [libidn=yes LIBS="${LIBS} -lidn"], libidn=no),
+ libidn=no)
+fi
+if test "$libidn" != "no" ; then
+ AC_DEFINE(LIBIDN, 1, [Define to 1 if you want IDN support.])
+ else
+ AC_MSG_FAILURE([Libidn not found])
+fi
+AC_MSG_RESULT($libidn)
+
+
+
# restore LIBS
LIBS=$SAVE_LIBS
AC_HEADER_SYS_WAIT
AC_TYPE_OFF_T
AC_TYPE_UID_T
-AC_CHECK_FUNCS([atoll stat64 strnlen mremap setrlimit sysconf initgroups strndup gethostbyname2 getpeerucred getpeereid setresuid $funcstocheck getifaddrs freeifaddrs getresgid mallinfo malloc_size malloc_usable_size])
+AC_CHECK_FUNCS([atoll stat64 strnlen mremap setrlimit sysconf initgroups strndup gethostbyname2 getpeerucred getpeereid setresuid $funcstocheck getifaddrs freeifaddrs getresgid mallinfo malloc_size malloc_usable_size getrusage])
# restore LIBS
LIBS=$SAVE_LIBS
AC_SUBST(SUDO_BINARY)
AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "x" -o -w /])
+
+# test for nssdir
+AC_MSG_CHECKING(with nssdir)
+AC_ARG_WITH(nssdir,
+ [ --with-nssdir=PATH where to install NSS plugins],
+ [AC_MSG_RESULT("$with_nssdir")
+ case $with_nssdir in
+ no)
+ NSS_DIR=
+ install_nss=0
+ ;;
+ yes)
+ NSS_DIR="/lib"
+ install_nss=1
+ ;;
+ *)
+ NSS_DIR=$with_nssdir
+ install_nss=1
+ ;;
+ esac
+ ],
+ [
+ if test "x$SUDO_BINARY" != "x" -o -w /
+ then
+ NSS_DIR="/lib"
+ install_nss=1
+ AC_MSG_RESULT([yes, to /lib])
+ else
+ NSS_DIR=
+ install_nss=0
+ AC_MSG_RESULT([no])
+ fi
+ ])
+AC_SUBST(NSS_DIR)
+AM_CONDITIONAL([INSTALL_NSS], [test "x$install_nss" != "x0"])
+
# test for gnunetdns group name
GNUNETDNS_GROUP=gnunetdns
AC_MSG_CHECKING(for gnunetdns group name)
AC_MSG_NOTICE([********************************************
-Please make sure that you have created a user and group 'gnunet'
-and additionally a group 'gnunetdns'. Make sure that '/var/lib/gnunet'
-is owned (and writable) by user 'gnunet'. Then, you can compile GNUnet
-with
- make
+Please make sure NOW that you have created a user and group 'gnunet'
+and additionally a group 'gnunetdns':
+ addgroup gnunetdns
+ adduser gnunet
+
+Make sure that '/var/lib/gnunet' is owned (and writable) by user
+'gnunet'. Then, you can compile GNUnet with
+ make
+
After that, run (if necessary as 'root')
make install
to install everything.
-Then, in order to start your peer, run as the 'gnunet' user
- mkdir ~gnunet/.gnunet/
- touch ~gnunet/.gnunet/gnunet.conf
- gnunet-arm -s
-Each GNUnet user should also be added to the 'gnunet' group (may
-require fresh login to come into effect) and create an (at least
-initially) empty configuration file:
- mkdir $HOME/.gnunet/
- touch $HOME/.gnunet/gnunet.conf
+Each GNUnet user should be added to the 'gnunet' group (may
+require fresh login to come into effect):
+ adduser $USERNAME gnunet
+(run the above command as root once for each of your users, replacing
+"$USERNAME" with the respective login names). If you have a global IP
+address, no further configuration is required.
-Optionally, download and compile:
-- gnunet-gtk to get a GUI for file-sharing and configuration.
+Optionally, download and compile gnunet-gtk to get a GUI for
+file-sharing and configuration. This is particularly recommended
+if your network setup is non-trivial, as gnunet-setup can be
+used to test in the GUI if your network configuration is working.
+gnunet-setup should be run as the "gnunet" user under X. As it
+does very little with the network, running it as "root" is likely
+also harmless. You can also run it as a normal user, but then
+you have to copy ~/.gnunet/gnunet.conf" over to the "gnunet" user's
+home directory in the end.
+
+Once you have configured your peer, run (as the 'gnunet' user)
+ gnunet-arm -s
+to start the peer. You can then run the various GNUnet-tools as
+your "normal" user (who should only be in the group 'gnunet').
********************************************])