fixes in server directory structure; fixed compilation errors
authorVictor Kirhenshtein <victor@netxms.org>
Thu, 16 Jul 2015 19:46:17 +0000 (22:46 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Thu, 16 Jul 2015 19:46:17 +0000 (22:46 +0300)
Makefile.am
configure.ac
contrib/backgrounds/Makefile.am
contrib/music/Makefile.am
images/Makefile.am
src/server/tools/nxdbmgr/nxdbmgr.cpp

index f99c223..0deb787 100644 (file)
@@ -15,4 +15,4 @@ SUBDIRS += @TOP_LEVEL_MODULES@
 
 install-exec-hook:
        if test "x@BUILD_SDK@" = "xyes"; then mkdir -p $(DESTDIR)$(includedir); cp config.h $(DESTDIR)$(includedir); mkdir -p $(DESTDIR)$(pkgdatadir)/sdk; cp libtool $(DESTDIR)$(pkgdatadir)/sdk; cp config/install-sh $(DESTDIR)$(pkgdatadir)/sdk; fi
-       if test "x@BUILD_SERVER@" = "xyes"; then LD_LIBRARY_PATH="$(DESTDIR)$(libdir):@INSTALL_LIBPATH@:${LD_LIBRARY_PATH}" $(DESTDIR)$(bindir)/nxmibc -d $(DESTDIR)$(pkgdatadir)/mibs -o $(DESTDIR)$(pkgdatadir)/mibs/netxms.mib; fi
+       if test "x@BUILD_SERVER@" = "xyes"; then LD_LIBRARY_PATH="$(DESTDIR)$(libdir):@INSTALL_LIBPATH@:${LD_LIBRARY_PATH}" $(DESTDIR)$(bindir)/nxmibc -d $(DESTDIR)$(pkgdatadir)/mibs -o $(DESTDIR)$(localstatedir)/lib/netxms/netxms.mib; fi
index d76d0ef..cd5c107 100644 (file)
@@ -2660,15 +2660,15 @@ fi
 
 if test "x$RUNTIME_PREFIX" = "x"; then
        if test "x${BUILD_UNICODE}" = "xyes"; then
-               CPPFLAGS="$CPPFLAGS -DPREFIX=L\\\"\${prefix}\\\" -DDATADIR=L\\\"\${pkgdatadir}\\\" -DBINDIR=L\\\"\${bindir}\\\" -DLIBDIR=L\\\"\${libdir}\\\" -DPKGLIBDIR=L\\\"\${pkglibdir}\\\""
+               CPPFLAGS="$CPPFLAGS -DPREFIX=L\\\"\${prefix}\\\" -DDATADIR=L\\\"\${pkgdatadir}\\\" -DBINDIR=L\\\"\${bindir}\\\" -DLIBDIR=L\\\"\${libdir}\\\" -DPKGLIBDIR=L\\\"\${pkglibdir}\\\" -DSTATEDIR=L\\\"\${localstatedir}/lib/netxms\\\""
        else
-               CPPFLAGS="$CPPFLAGS -DPREFIX=\\\"\${prefix}\\\" -DDATADIR=\\\"\${pkgdatadir}\\\" -DBINDIR=\\\"\${bindir}\\\" -DLIBDIR=\\\"\${libdir}\\\" -DPKGLIBDIR=\\\"\${pkglibdir}\\\""
+               CPPFLAGS="$CPPFLAGS -DPREFIX=\\\"\${prefix}\\\" -DDATADIR=\\\"\${pkgdatadir}\\\" -DBINDIR=\\\"\${bindir}\\\" -DLIBDIR=\\\"\${libdir}\\\" -DPKGLIBDIR=\\\"\${pkglibdir}\\\" -DSTATEDIR=\\\"\${localstatedir}/lib/netxms\\\""
        fi
 else
        if test "x${BUILD_UNICODE}" = "xyes"; then
-               CPPFLAGS="$CPPFLAGS -DPREFIX=L\\\"$RUNTIME_PREFIX\\\" -DDATADIR=L\\\"$RUNTIME_PREFIX/share/netxms\\\" -DBINDIR=L\\\"$RUNTIME_PREFIX/bin\\\" -DLIBDIR=L\\\"$RUNTIME_PREFIX/lib\\\" -DPKGLIBDIR=L\\\"$RUNTIME_PREFIX/lib/netxms\\\""
+               CPPFLAGS="$CPPFLAGS -DPREFIX=L\\\"$RUNTIME_PREFIX\\\" -DDATADIR=L\\\"$RUNTIME_PREFIX/share/netxms\\\" -DBINDIR=L\\\"$RUNTIME_PREFIX/bin\\\" -DLIBDIR=L\\\"$RUNTIME_PREFIX/lib\\\" -DPKGLIBDIR=L\\\"$RUNTIME_PREFIX/lib/netxms\\\" -DSTATEDIR=L\\\"$RUNTIME_PREFIX/var/lib/netxms\\\""
        else
-               CPPFLAGS="$CPPFLAGS -DPREFIX=\\\"$RUNTIME_PREFIX\\\" -DDATADIR=\\\"$RUNTIME_PREFIX/share/netxms\\\" -DBINDIR=\\\"$RUNTIME_PREFIX/bin\\\" -DLIBDIR=\\\"$RUNTIME_PREFIX/lib\\\" -DPKGLIBDIR=\\\"$RUNTIME_PREFIX/lib/netxms\\\""
+               CPPFLAGS="$CPPFLAGS -DPREFIX=\\\"$RUNTIME_PREFIX\\\" -DDATADIR=\\\"$RUNTIME_PREFIX/share/netxms\\\" -DBINDIR=\\\"$RUNTIME_PREFIX/bin\\\" -DLIBDIR=\\\"$RUNTIME_PREFIX/lib\\\" -DPKGLIBDIR=\\\"$RUNTIME_PREFIX/lib/netxms\\\" -DSTATEDIR=\\\"$RUNTIME_PREFIX/var/lib/netxms\\\""
        fi
 fi
 LDFLAGS="$LDFLAGS_PREFIX $LDFLAGS $LDFLAGS_SUFFIX"
index af1d7d2..dee7a33 100644 (file)
@@ -8,7 +8,7 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-bkdir=$(pkgdatadir)/backgrounds
+bkdir=$(localstatedir)/lib/netxms/backgrounds
 
 bk_DATA = .keep
 
index bb17caf..fce02c7 100644 (file)
@@ -8,7 +8,7 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-musicdir=$(pkgdatadir)/files
+musicdir=$(localstatedir)/lib/netxms/files
 
 music_DATA = \
        Warning-A.wav \
index 7812058..13033b8 100644 (file)
@@ -8,7 +8,7 @@
 # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
-imagesdir=$(pkgdatadir)/images
+imagesdir=$(localstatedir)/lib/netxms/images
 
 images_DATA = \
        092e4b35-4e7c-42df-b9b7-d5805bfac64e \
index f0305c9..db5c4d9 100644 (file)
@@ -743,37 +743,6 @@ stop_search:
    }
 
    // Read configuration file
-#if !defined(_WIN32) && !defined(_NETWARE)
-       if (!_tcscmp(configFile, _T("{search}")))
-       {
-      const TCHAR *homeDir = _tgetenv(_T("NETXMS_HOME"));
-      if ((homeDir != NULL) && (*homeDir != 0))
-      {
-         TCHAR config[MAX_PATH];
-         _sntprintf(config, MAX_PATH, _T("%s/etc/netxmsd.conf"), homeDir);
-                  if (_taccess(config, 4) == 0)
-                  {
-                          _tcscpy(configFile, config);
-            goto stop_search;
-                  }
-      }
-               if (_taccess(PREFIX _T("/etc/netxmsd.conf"), 4) == 0)
-               {
-                       _tcscpy(configFile, PREFIX _T("/etc/netxmsd.conf"));
-               }
-               else if (_taccess(_T("/usr/etc/netxmsd.conf"), 4) == 0)
-               {
-                       _tcscpy(configFile, _T("/usr/etc/netxmsd.conf"));
-               }
-               else
-               {
-                       _tcscpy(configFile, _T("/etc/netxmsd.conf"));
-               }
-stop_search:
-      ;
-       }
-#endif
-
        Config *config = new Config();
        if (!config->loadIniConfig(configFile, _T("server")) || !config->parseTemplate(_T("server"), m_cfgTemplate))
    {