-if TARGET_GENTOO
-AM_CPPFLAGS += \
- -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
- -DKBD_SETFONT=\"/usr/bin/setfont\"
-else
-if TARGET_ARCH
-AM_CPPFLAGS += \
- -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
- -DKBD_SETFONT=\"/usr/bin/setfont\"
-else
-if TARGET_FRUGALWARE
-AM_CPPFLAGS += \
- -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
- -DKBD_SETFONT=\"/usr/bin/setfont\"
-else
-if TARGET_MANDRIVA
-AM_CPPFLAGS += \
- -DKBD_LOADKEYS=\"/bin/loadkeys\" \
- -DKBD_SETFONT=\"/bin/setfont\"
-else
-if TARGET_ANGSTROM
-AM_CPPFLAGS += \
- -DKBD_LOADKEYS=\"/usr/bin/loadkeys\" \
- -DKBD_SETFONT=\"/usr/bin/setfont\"
-else
-if TARGET_MAGEIA
-AM_CPPFLAGS += \
- -DKBD_LOADKEYS=\"/bin/loadkeys\" \
- -DKBD_SETFONT=\"/bin/setfont\"
-else
-AM_CPPFLAGS += \
- -DKBD_LOADKEYS=\"/bin/loadkeys\" \
- -DKBD_SETFONT=\"/bin/setfont\"
-endif
-endif
-endif
-endif
-endif
-endif
+
+define move-to-rootlibdir
+ if test "$(libdir)" != "$(rootlibdir)"; then \
+ $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
+ so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
+ so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
+ ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
+ mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
+ fi
+endef
+
+INSTALL_DIRS =
+
+RUNLEVEL1_TARGET_WANTS =
+RUNLEVEL2_TARGET_WANTS =
+RUNLEVEL3_TARGET_WANTS =
+RUNLEVEL4_TARGET_WANTS =
+RUNLEVEL5_TARGET_WANTS =
+SHUTDOWN_TARGET_WANTS =
+LOCAL_FS_TARGET_WANTS =
+MULTI_USER_TARGET_WANTS =
+SYSINIT_TARGET_WANTS =
+BASIC_TARGET_WANTS =
+SOCKETS_TARGET_WANTS =
+
+install-target-wants-hook:
+ what="$(RUNLEVEL1_TARGET_WANTS)" && wants=runlevel1.target && $(add-wants)
+ what="$(RUNLEVEL2_TARGET_WANTS)" && wants=runlevel2.target && $(add-wants)
+ what="$(RUNLEVEL3_TARGET_WANTS)" && wants=runlevel3.target && $(add-wants)
+ what="$(RUNLEVEL4_TARGET_WANTS)" && wants=runlevel4.target && $(add-wants)
+ what="$(RUNLEVEL5_TARGET_WANTS)" && wants=runlevel5.target && $(add-wants)
+ what="$(SHUTDOWN_TARGET_WANTS)" && wants=shutdown.target && $(add-wants)
+ what="$(LOCAL_FS_TARGET_WANTS)" && wants=local-fs.target && $(add-wants)
+ what="$(MULTI_USER_TARGET_WANTS)" && wants=multi-user.target && $(add-wants)
+ what="$(SYSINIT_TARGET_WANTS)" && wants=sysinit.target && $(add-wants)
+ what="$(BASIC_TARGET_WANTS)" && wants=basic.target && $(add-wants)
+ what="$(SOCKETS_TARGET_WANTS)" && wants=sockets.target && $(add-wants)
+
+define add-wants
+ dir=$(DESTDIR)$(systemunitdir)/$$wants.wants && \
+ $(MKDIR_P) -m 0755 $$dir && \
+ ( cd $$dir && \
+ rm -f $$what && \
+ for i in $$what; do ln -s ../$$i . || exit $$? ; done )
+endef
+
+install-directories-hook:
+ $(MKDIR_P) $(addprefix $(DESTDIR),$(INSTALL_DIRS))
+
+INSTALL_EXEC_HOOKS += \
+ install-target-wants-hook \
+ install-directories-hook