*
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.1 2004/08/01 13:54:05 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.2 2004/08/01 14:01:36 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#define _(x) gettext((x))
-char * progname;
+static char *progname;
static void
help()
progname = (char *)get_progname(argv[0]);
-
-
if (argc < 2)
{
fprintf(stderr,_("%s: argument required\n"),progname);
strcmp(argv[i],"--includedir-server") == 0 ||
strcmp(argv[i],"--libdir") == 0 ||
strcmp(argv[i],"--pkglibdir") == 0 ||
- strcmp(argv[i],"--configure") == 0
- )
+ strcmp(argv[i],"--configure") == 0)
{
/* come back to these later */
-
continue;
}
exit(1);
}
-
-
for (i=1; i < argc; i++)
{
if (strcmp(argv[i],"--configure") == 0)
{
/* the VAL_CONFIGURE macro must be defined by the Makefile */
-
printf("%s\n",VAL_CONFIGURE);
continue;
}
if (strcmp(argv[i],"--bindir") == 0)
{
/* assume we are located in the bindir */
-
- char * lastsep;
+ char *lastsep;
strcpy(otherpath,mypath);
lastsep = strrchr(otherpath,'/');
if (lastsep)
get_pkglib_path(mypath,otherpath);
printf("%s\n",otherpath);
-
-
}
return 0;