]> Git repositories of Nishi - repoview.git/commitdiff
fix config.h
authorNishi <nishi@nishi.boats>
Thu, 22 Aug 2024 03:02:58 +0000 (03:02 +0000)
committerNishi <nishi@nishi.boats>
Thu, 22 Aug 2024 03:02:58 +0000 (03:02 +0000)
git-svn-id: file:///raid/svn-personal/repoview/trunk@37 7e8b2a19-8934-dd40-8cb3-db22cdd5a80f

check.c
config.h.tmpl
objs.c

diff --git a/check.c b/check.c
index 995151699c28294970a77ac8679341ed8847e149..39eb2b700ead27abf79d47ee1b50fe2c8823ca71 100644 (file)
--- a/check.c
+++ b/check.c
@@ -99,6 +99,19 @@ int check_mypage(void) {
 #if defined(USE_MYPAGE) && !defined(USE_LIBPNG)
        fprintf(stderr, "USE_MYPAGE is defined, but USE_LIBPNG is not defined.\n");
        st = 1;
+#endif
+#if defined(USE_MYPAGE) && !defined(USE_AVATAR)
+       fprintf(stderr, "USE_MYPAGE is defined, but USE_AVATAR is not defined.\n");
+       st = 1;
+#endif
+       return st;
+}
+
+int check_avatar(void) {
+       int st = 0;
+#if defined(USE_AVATAR) && !defined(USE_LIBPNG)
+       fprintf(stderr, "USE_AVATAR is defined, but USE_LIBPNG is not defined.\n");
+       st = 1;
 #endif
        return st;
 }
@@ -115,6 +128,8 @@ int main() {
        if(st != 0) goto fail;
        st = check_mypage();
        if(st != 0) goto fail;
+       st = check_avatar();
+       if(st != 0) goto fail;
        printf("Config validation successful.\n");
        return 0;
 fail:
index 20a8720d650f1cbdfd4e09616fe83e4ce65ad42c..dab0cd593bb9169fc572428fd6a64fd044760d84 100644 (file)
 /* Use libpng or not. */
 #define USE_LIBPNG
 
+/* Use avatar or not. */
+/* Required USE_LIBPNG to be defined. */
+#define USE_AVATAR
+
 /* My Page for the modern theme.*/
-/* Requires USE_GRAPHICSMAGICK and USE_LIBPNG to be defined. */
+/* Requires USE_GRAPHICSMAGICK, USE_LIBPNG, USE_AVATAR to be defined. */
 #define USE_MYPAGE
 
 /* PATH, uses PATH from environment automatically if not defined. */
diff --git a/objs.c b/objs.c
index 1897d26c67c178d5b8a93ee7506ad799cdd7f21b..d097a9518aab1d706e26abf9b311dd24eca9cf8a 100644 (file)
--- a/objs.c
+++ b/objs.c
@@ -21,7 +21,7 @@ int main() {
        printf("enscript.o");
 #endif
        printf(" ");
-#if defined(USE_MYPAGE)
+#if defined(USE_AVATAR)
        printf("avatar.o");
 #endif
        printf("\n");