Skip to content

Commit

Permalink
Use version defines also usable from getdns build system
Browse files Browse the repository at this point in the history
  • Loading branch information
wtoorop committed Feb 13, 2018
1 parent 19d9a8c commit a03e39a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
AC_PREREQ([2.68])
AC_INIT([Stubby], [0.2.1], [[email protected]])
AC_INIT([Stubby], [0.2.2-rc1], [[email protected]])
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/stubby.c])
AC_CONFIG_HEADERS([config.h])

AC_DEFINE_UNQUOTED([STUBBY_PACKAGE], [PACKAGE], [Stubby package])
AC_DEFINE_UNQUOTED([STUBBY_PACKAGE_STRING], [PACKAGE_STRING], [Stubby package string])

# Autoconf 2.70 will have set up runstatedir. 2.69 is frequently (Debian)
# patched to do the same, but frequently (MacOS) not. So add a with option
# for pid file location, and default it to runstatedir if present.
Expand Down
6 changes: 3 additions & 3 deletions src/stubby.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static void stubby_local_log(void *userarg, uint64_t system,
void
print_usage(FILE *out)
{
fprintf(out, "usage: " PACKAGE " [<option> ...] \\\n");
fprintf(out, "usage: " STUBBY_PACKAGE " [<option> ...] \\\n");
fprintf(out, "\t-C\t<filename>\n");
fprintf(out, "\t\tRead settings from config file <filename>\n");
fprintf(out, "\t\tThe getdns context will be configured with these settings\n");
Expand Down Expand Up @@ -155,13 +155,13 @@ print_usage(FILE *out)
fprintf(out, "\t\t\t5: NOTICE - %s\n", GETDNS_LOG_NOTICE_TEXT);
fprintf(out, "\t\t\t6: INFO - %s\n", GETDNS_LOG_INFO_TEXT);
fprintf(out, "\t\t\t7: DEBUG - %s\n", GETDNS_LOG_DEBUG_TEXT);
fprintf(out, "\t-V\tPrint the " PACKAGE " version\n");
fprintf(out, "\t-V\tPrint the " STUBBY_PACKAGE " version\n");
}

void
print_version(FILE *out)
{
fprintf(out, PACKAGE_STRING "\n");
fprintf(out, STUBBY_PACKAGE_STRING "\n");
}

#ifndef GETDNS_RETURN_IO_ERROR
Expand Down

0 comments on commit a03e39a

Please sign in to comment.