summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/Anope.cmake22
-rw-r--r--data/anope.example.conf2
-rw-r--r--language/anope.de_DE.po4
-rw-r--r--modules/extra/m_ldap.cpp9
4 files changed, 26 insertions, 11 deletions
diff --git a/cmake/Anope.cmake b/cmake/Anope.cmake
index 06c01525a..bda078da9 100644
--- a/cmake/Anope.cmake
+++ b/cmake/Anope.cmake
@@ -210,24 +210,32 @@ macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
# Iterate through the libraries given
foreach(LIBRARY ${REQUIRED_LIBRARY})
+ # If the library has multiple names extract the alternate.
+ unset(LIBRARY_ALT)
+ if (${LIBRARY} MATCHES "^.+\\|.+$")
+ string(REGEX REPLACE ".+\\|(.*)" "\\1" LIBRARY_ALT ${LIBRARY})
+ string(REGEX REPLACE "(.+)\\|.*" "\\1" LIBRARY ${LIBRARY})
+ endif()
# Locate the library to see if it exists
if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
- find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS})
+ find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS})
else()
- find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH)
- find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS})
+ find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH)
+ find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS})
endif()
# If the library was found, we will add it to the linker flags
if(FOUND_${LIBRARY}_LIBRARY)
- # Get the path only of the library, to add it to linker flags
- get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
if(MSVC)
# For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies
list(APPEND EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}")
else()
- # For all others, add the library paths and libraries
+ # Get the path only of the library, to add it to library paths.
+ get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
list(APPEND LIBRARY_PATHS "${LIBRARY_PATH}")
- list(APPEND LIBRARIES "${LIBRARY}")
+ # Extract the library short name, add it to the library path
+ get_filename_component(LIBRARY_NAME ${FOUND_${LIBRARY}_LIBRARY} NAME_WE)
+ string(REGEX REPLACE "^lib" "" LIBRARY_NAME ${LIBRARY_NAME})
+ list(APPEND LIBRARIES ${LIBRARY_NAME})
endif()
else()
# In the case of the library not being found, we fatally error so CMake stops trying to generate
diff --git a/data/anope.example.conf b/data/anope.example.conf
index 306e8ee34..5919ac1e6 100644
--- a/data/anope.example.conf
+++ b/data/anope.example.conf
@@ -645,6 +645,8 @@ log
* - a channel name
* - a filename
* - globops
+ *
+ * If you specify a filename the current date in the format ".YYYYMMDD" will be appended to the path.
*/
target = "services.log"
diff --git a/language/anope.de_DE.po b/language/anope.de_DE.po
index 5206a3363..91a5624f2 100644
--- a/language/anope.de_DE.po
+++ b/language/anope.de_DE.po
@@ -10935,12 +10935,12 @@ msgstr ""
#: modules/commands/cs_invite.cpp:76
#, fuzzy, c-format
msgid "You have been invited to %s by %s."
-msgstr "Du wurdest zu %seingeladen."
+msgstr "Du wurdest zu %s eingeladen."
#: modules/commands/cs_invite.cpp:81
#, c-format
msgid "You have been invited to %s."
-msgstr "Du wurdest zu %seingeladen."
+msgstr "Du wurdest zu %s eingeladen."
#: modules/protocol/ratbox.cpp:166 modules/commands/ns_recover.cpp:96
#, c-format
diff --git a/modules/extra/m_ldap.cpp b/modules/extra/m_ldap.cpp
index 34f1310c4..1005d2efe 100644
--- a/modules/extra/m_ldap.cpp
+++ b/modules/extra/m_ldap.cpp
@@ -9,13 +9,18 @@
* Based on the original code of Services by Andy Church.
*/
-/* RequiredLibraries: ldap_r,lber */
-/* RequiredWindowsLibraries: libldap_r,liblber */
+/* RequiredLibraries: ldap_r|ldap,lber */
+/* RequiredWindowsLibraries: libldap_r|libldap,liblber */
#include "module.h"
#include "modules/ldap.h"
#include <ldap.h>
+#if defined LDAP_API_FEATURE_X_OPENLDAP_REENTRANT && !LDAP_API_FEATURE_X_OPENLDAP_REENTRANT
+# error Anope requires OpenLDAP to be built as reentrant.
+#endif
+
+
class LDAPService;
static Pipe *me;