I had to
export CC=/usr/bin/cc
to force configure to use cc (Solaris Studio) instead of gcc.
Then in solaris_niagara2.c, two changes are necessary.
typedef struct __t2_pst_table
{
int papi_pst; // change from unsigned int to int
char *ntv_event[MAX_COUNTERS];
int ntv_ctrs;
int ntv_opcode;
} __t2_pst_table_t;
and
int _niagara2_get_system_info( papi_mdi_t mdi );
to
int _niagara2_get_system_info( papi_mdi_t *mdi );
Hope this helps!
Next, I have the joys of accessing PAPI from a Java program via JNI
