chiark / gitweb /
+ * Use AC_PROG_INSTALL (=> perhaps install-sh), to avoid bad `install'.
[adns.git] / configure.in
index 50e69e1640dfa48ef9d3825e7827fee1eb253cb6..dc09113cfd775fa6d22bbe1bad0ac98b75e0a963 100644 (file)
 
 AC_INIT(src/adns.h)
 AC_CONFIG_HEADER(src/config.h)
+
+AC_MSG_CHECKING(whether you requested dynamic linking)
+AC_SUBST(ENABLE_DYNAMIC)
+AC_ARG_ENABLE(dynamic,
+[  --disable-dynamic       use static linking
+  --enable-dynamic[=elf]  create and use ELF dynamic library (default)],
+[      case "$enableval" in
+       elf|yes)
+               ENABLE_DYNAMIC=elf
+               AC_MSG_RESULT([yes (ELF)])
+               ;;
+       no)     ENABLE_DYNAMIC=no
+               AC_MSG_RESULT(no)
+               ;;
+       *)      AC_MSG_ERROR(
+["invalid value $enableval for --enable-dynamic, try yes or elf"])
+               ;;
+       esac
+],[
+               ENABLE_DYNAMIC=yes
+               AC_MSG_RESULT([yes, by default])
+])
+
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_RANLIB
+AC_PROG_INSTALL
 
 AC_CHECK_FUNCS(poll)
 ADNS_C_GETFUNC(socket,socket)