Commit 0fb21e67 authored by Max Kellermann's avatar Max Kellermann

configure.ac: use AC_CHECK_HEADERS to check for locale.h

AC_CHECK_HEADERS defines HAVE_LOCALE_H, so we don't have to manually define HAVE_LOCALE.
parent 694a919b
...@@ -94,7 +94,7 @@ AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",) ...@@ -94,7 +94,7 @@ AC_CHECK_LIB(nsl,gethostbyname,MPD_LIBS="$MPD_LIBS -lnsl",)
AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",) AC_CHECK_LIB(m,exp,MPD_LIBS="$MPD_LIBS -lm",)
AC_CHECK_HEADER(locale.h,[enable_locale=yes;AC_DEFINE(HAVE_LOCALE,1,[Define if locale.h is present])],enable_locale=no) AC_CHECK_HEADERS(locale.h)
dnl dnl
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
#include <grp.h> #include <grp.h>
#endif #endif
#ifdef HAVE_LOCALE #ifdef HAVE_LOCALE_H
#include <locale.h> #include <locale.h>
#endif #endif
...@@ -221,7 +221,7 @@ int main(int argc, char *argv[]) ...@@ -221,7 +221,7 @@ int main(int argc, char *argv[])
daemonize_close_stdin(); daemonize_close_stdin();
#ifdef HAVE_LOCALE #ifdef HAVE_LOCALE_H
/* initialize locale */ /* initialize locale */
setlocale(LC_CTYPE,""); setlocale(LC_CTYPE,"");
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment